Home | Forum


  Fixes: 43
  Resolutions: 12577


My Fixes :: View topic - Getting started in .Net (C# Part 1)
RegisterSearchFAQMemberlistUsergroupsLog in
Reply to topic Page 1 of 1
Getting started in .Net (C# Part 1)
Author Message
Reply with quote
Post Getting started in .Net (C# Part 1) 
Getting started in the .Net Lanuages (C# Part 1 - Basic Console Programs)

Quote:


C# is Microsoft's new programming language for the .NET platform. It combines some of the

best features of modern programming languages such as Java, C++ or Visual Basic. C# is an

object-oriented language with single inheritance but multiple interfaces per class. It

supports component-based programming by properties (smart fields), events and delegates

(enhanced function pointers). C# is fully interoperable with other .NET languages such as

VB.NET, Eiffel.NET or Oberon.NET.



What you will need

-The Compiler/IDE

As far as this goes you have a few choices, the top two however are SharpDevelop

(Free)(http://www.icsharpcode.net/Opensource/SD/), and visual Studios (Not free Smile)

(http://msdn.microsoft.com/vstudio/). SharpDevelop is the way to go if your tight on money.



-Getting Started (Your First Program)

By now you should have choosen a compiler to use. Open up a new "Console Application", and

do the following.

Code:

using System;
class Hello
{
   public class HelloWorld
   {
   public static void Main()
   {
  Console.WriteLine("Hello World! ");
  Console.ReadLine();
   }
   }
}


Now save and compile and run. You just made your first program. It should print hello world

to your screen in a dos box, and close when you press enter.


Think your ready to up it one step? Here is another console application example.

Code:

using System;
using System.Collections.Generic;
using System.Text;

namespace YourName
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.WriteLine("Hello there!");
            Console.Write("Please input your name: ");
            string alfa = Console.ReadLine();
            Console.WriteLine("Hello " + alfa + ". Welcome to C#");
            Console.Read();
        }
    }
}



That application is simple, it only asks for a name, then displays it on the console along with a little message.
------------------

Next article will cover more beginner topics, and begin to get a little more advaced.


_________________
Protect your computer

Proud Member of ASAP (Alliance of Security Analysis Professionals)
View user's profile Send private message Send e-mail Visit poster's website AIM Address
Reply with quote
Post from were i can download a link of C# or its IDE.. 
i want to learn these basic programming.. couse i want to know how to program VB.. i want to learn something even if its basic.. would you help me master.. Sad

View user's profile Send private message Yahoo Messenger
Reply with quote
Post  
Why do you want to learn VB? C# is much better.


_________________
Please report all bugs and abuses here:
http://www.myfixes.com/forum/viewforum.php?f=12

For more information on spyware and spyware removal techniques see this article:
http://www.myfixes.com/slides/spyware

For information on optimizing and tweaking Windows see the following pages:
http://www.myfixes.com/slides/msconfig
http://www.myfixes.com/quickfixes/categories/Registry%20Tweaks
View user's profile Send private message Visit poster's website
Reply with quote
Post reasonz 
this are my reason master why im want to learn C#:
1. learn basic of scripting.. i want to invent a software that is capable of connection compter from server down to work station
2. i want to script a program that can manipulate a control folders.. that is capable of hide system file

3. i want to script friendly virus
and lastly.
4. i want to help others in such way they may protect thier computers form malware.

hoping you consider my reasons.. i am looking forward to be one of your student..
im assuring you i could be a good student and succesor if you grant my wants..

View user's profile Send private message Yahoo Messenger
Display posts from previous:
Reply to topic Page 1 of 1
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum