C#.NET Code Snippets

OOPS Features in brief
The programming in which data is logically represented in the form of a class and physically represented in the form an object is called as object oriented programming (OOP).
C# Access Modifier
Different Access Modifiers in C# are Public, Private, Protected, internal, protected internal.Default access modifier for members of class is private.
Classes in .NET
A class in .NET can be created with only two access modifiers, public and internal. Default is Internal.
Static Members Vs Instance Members in C#.NET
The members of a class that can not be accessed without creating an instance for the class are called as instance members and the members of a class that can be accessed without creating an instance and directly by using class name are called as static me
C# Method Example
Properties are used to provide access to private fields of a class. methods are used to execute some task.
Static Class in .NET
If you want to restrict the class from instantiated , you can declare the class as static class.
Constructor in C#
A special method of the class that will be automatically invoked when an instance of the class is created is called as constructor.
Constructor types with example programs in C#.NET
A constructor with at least one parameter is called as parameterized constructor.
Destructor in C#.NET
A destructor is a special method of the class that is automatically invoked while an instance of the class is destroyed.
C# Call Constructor from Constructor
Inside a c# class , you can call a constructor from another constructor using the keyword this.