O.k Lets start with the basics of C#
C# is a programming language made by Microsoft designed for the .NET Framework
The influences of this language are C++ and Java
The compiler for this language is either Microsoft C# express edition or i have Microsoft visual studio 2008 cracked if you need it
so on with the tutorial first as i always do a Hello World Application
---------------------------------------------------------
// this is a comment just like in C++
---------------------------------------------------------
name space Some C#// The Name of your first program
{// begin program
using System;// using your system
class Example//the class is example
{// begins main void
static void Main()
{
Console.WriteLine("Hello world!");// tells the compiler to write the words on the line since this is console application
}// closes The writing
}// closes the main void
}// closes the program
------------------------------------------------------------
here is the code without tags
Code:
namespace Some C# {
using System;
class Example {
static void Main ( ) {
Console.WriteLine ("Hello world!");
}
}
}
Now something a little more advanced (not much though)
using System;
namespace ConsoleApp
{
// class Program is the €œobject€ containing our code
public class Program
{
// This is where the main program starts
static void Main(string[] args)
{
// prompt user to enter a name
Console.WriteLine(€œEnter The name, please:€);
// now read the name entered
string sName = Console.ReadLine();
// Repeats Back The Name That Was Previously entered
Console.WriteLine(€œHello, €œ + sName);
// wait for you
Console.WriteLine(€œPress Enter to exit GameOver...€);
Console.Read();
// Main ends here
}
} // Program ends here
} // name space ends
Now Again Code with out tags
Code:
using namespaces.you.need.here;
namespace nameofyourapplication
{
class classnamehere
{
Static String somevar = "Hello World";
static void Main(string[] args)
{
Console.WriteLine(somevar);
}
}
}
There you go guys another basic tutorial.