Static Class, Static Class Member and Static Constructor

Static Class: The static modifier can be used with classes, fields, methods, properties, operators, events and constructors but it cannot be used with indexers, finalizers or types other than classes. A static class cannot be instantiated means you cannot use the new keyword to create a variable of the class type. Because there is no instance … Continue reading Static Class, Static Class Member and Static Constructor

Advertisements

C#

C# (Pronounced C Sharp) is a simple, Object Oriented Programming language. C# syntax is very much similar to C, C++ and Java. Example: // File name is ---> Hello1.cs using System; public class Hello1 { public static void Main() { Console.WriteLine("Hello, World!"); } } The Main method is the entry point of a C# console … Continue reading C#