- In C#, it is not possible to create global functions or global points of data. Rather all data members and all methods must be contained within a type definition like within a class.
- C# is a case-sensitive language.
- All C# keywords are lowercase like public, static, class etc., while namespace, types and member name uses CAML-casing like Console, WriteLine, MessageBox etc.
- Whenever you receive a compiler error regarding “undefined symbols”, be sure to check the spellings and casing first.
- There can be more than one Main() method in the program, but you must inform the compiler which Main() method should be used as the entry point either via /main option of the command-line compiler or via the Startup Object drop down list box, located under Application tab of Visual Studio project properties editor.
- Main() method has a single parameter, args[], which is an array of string. This parameter may contain any number of incoming command-line arguments. Main() method is uses static and void keywords. static members are scoped to class level rather than object level, thus can be invoked without the need to first create a new class instance. void return value means we do not explicitly define a return value using the return keyword before exiting the method scope.
- // is used to make single line comments. /* */ is used to make multiple line comments.
- Statements in C# language are terminated by semicolon (;).
- We cannot define overloaded method if it differs from another method only on out and ref.
Tag: .NET
This category contains various articles related to DotNet.