private int Member1; protected int Member2; internal int Member3; protected internal int Member4;
Quote:Quote: Access Modifier Public: Accessible from any where that means within an assemble or outside assembly. Private: Accessible within the class. Protected: Accessible within the class and inherited class or child class. Internal: Accessible within the current Assembly. Protected Internal: Accessible within the current assembly and type derived from the assemble. For More detail Please see: What are Access Modifiers in C#?[^] Abstract Abstract keyword is used to mark the class as abstract. When a class is marked with abstract that means one or more method in the class is abstract where method only contains the declaration of the method. All the abstract method must me defined in the inheriting class. It helps to implement polymorphism where one method can have multiple definition as per the requirement. for example. if we take an example of class Shape which has a abstract method CalArea(). then class Circle which is inherited from shape can have different definition from the class Rectangle which is again inherited from Class Shape. More detail refer to Abstract Classes[^] constant this is used with the field which contains the universal value like meter. In the whole universe the value of 1meter=100cm. so it is marked as const. once the value is defined it cannot be changed through out the application. For more detail const (C# Reference)[^] static In general static means only one copy will exist per invironment. static keyword can be used with field, property, class, constructor, method, operator and events. static members belong to type itself. if a class is marked with static then no instance of the class can be created i.e. object can not be created or class can not be instantiated. it cannot be used with indexers, destructors and delegates. A static class is basically same as the non-static class but there is one difference 1.static class cannot be initiated or you cannot use new keyword to create a variable or the class. For more detail static (C# Reference)[^]
Quote: Access Modifier Public: Accessible from any where that means within an assemble or outside assembly. Private: Accessible within the class. Protected: Accessible within the class and inherited class or child class. Internal: Accessible within the current Assembly. Protected Internal: Accessible within the current assembly and type derived from the assemble. For More detail Please see: What are Access Modifiers in C#?[^] Abstract Abstract keyword is used to mark the class as abstract. When a class is marked with abstract that means one or more method in the class is abstract where method only contains the declaration of the method. All the abstract method must me defined in the inheriting class. It helps to implement polymorphism where one method can have multiple definition as per the requirement. for example. if we take an example of class Shape which has a abstract method CalArea(). then class Circle which is inherited from shape can have different definition from the class Rectangle which is again inherited from Class Shape. More detail refer to Abstract Classes[^] constant this is used with the field which contains the universal value like meter. In the whole universe the value of 1meter=100cm. so it is marked as const. once the value is defined it cannot be changed through out the application. For more detail const (C# Reference)[^] static In general static means only one copy will exist per invironment. static keyword can be used with field, property, class, constructor, method, operator and events. static members belong to type itself. if a class is marked with static then no instance of the class can be created i.e. object can not be created or class can not be instantiated. it cannot be used with indexers, destructors and delegates. A static class is basically same as the non-static class but there is one difference 1.static class cannot be initiated or you cannot use new keyword to create a variable or the class. For more detail static (C# Reference)[^]
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)