Hello guys,
Please someone explain me the above question please? with example would be great
Cheers,
Dummy
Printable View
Hello guys,
Please someone explain me the above question please? with example would be great
Cheers,
Dummy
Using the static modifier on any member of a class means that the member belongs to the type itself instead of an instance of an object. Examples of static methods commonly used would be Console.WriteLine or MessageBox.Show. Neither of these methods requires an object to be instantiated before use.
If you have the .NET Framework documentation local to your system, check the following link.
http://ms-help://MS.NETFrameworkSDKv...rfStaticPG.htm
The void modifier means that the method doesn't return a value of any kind.
The Main method of an assembly is the entry point for that assembly, similar to a constructor in the sense that you can initialize whatever components and variables needed to operate the assembly. An example would be the following:
Hope that's helpful.Code:public class SomeWindowsForm : Form {
public static void Main() {
Application.Run(new SomeWindowsForm());
}
public SomeWindowsForm() : base() { ... }
}