I'm watching a video on C# about Variables. The author declares a variable inside a method and he named it like this: string MyName =James;my question is: which convention is recommended by .Net Framework. Is it Pascal casing as in the above example or is it camel case?
Naming convention of variables in C# programming language
c#;coding standards;variables;conventions
I don't think there's something like an 'official' convention. As far as I know, the following is considered good practice by many  experienced C# developers:PascalCase for public member variables (string MyName = James)camelCase for local variables (string myName = James)_leadingUnderscore for private member variables (string _myName = James)With this approach, one can distinguish between local variables as well as public and private members by the case of their first letter.As with any coding convention, this is also subject to personal preferences. Therefore, there is no definite answer. A general goal should be to keep the code as readable and comprehensible as possible.