-
C# Starting out
What are the naming conventions defined by .Net? I haven't had a chance to look at the API but from the code below im assuming that all methods follow X or XxxxXxxx. Also can the Main thread of execution take arguements? Thanks.
Code:
using System;
class Hello{
static void Main() {
Console.WriteLine("Hello, World");
}
}
-
Re: C# Starting out
Methods should follow that, there are coding conventions you can find on microsoft.com and others. Main, MyMethod etc., not main or myMethod. Of course they don't have to, you can name however you want.
Just modify your code like so to grab the args:
Code:
static void Main(string[] args)
-
Re: C# Starting out
I haven't looked at really any C# code except for a few snippets but from the code i looked at it looks like the api types have to be defined in lowercase. Is this correct?
-
Re: C# Starting out
-
Re: C# Starting out
Your best bet is the Design Guildelines for Class Library Developers on Microsoft's site. These are strictly guidelines though, upper case and lower case variations depend on who's doing the coding.
But from the looks of it, your machine is not fast enough and you do not have enough ram, video, and hard disk space to be able to follow any guidelines, so good luck :)
I work with ex-Java developers though who write C# code like Java. Don't do that!