November 2016 - Coding Sharp

Month: November 2016

Introduction to Class in OOPS with C#.net

Introduction to Class in OOPS with C#.net

C#.Net, Special Posts
Understanding class A class is like a blueprint. It allows us to create our own custom data types by grouping methods, events and variables of different types like int, string or any other custom types. Class defines the data and behavior of a type. A class can be defined with a keyword "class" followed by the class name and body of the class with a pair of curly braces. Let's have a look at the general form of a class body. below is the general form of a class body. Classes supports inheritance while structs can't support it. Access specifiers plays an important role in the class definition, which specify the rules for accessing the member as well as the class itself. Default access specifier for the class is internal while for member it is private. Data type specifies ...