Knowledge Management Banner

Knowledge Management Banner

C# : type and type members , default access modifiers : Part 20

Types
Following are all types in c#
  • Class
  • Structure
  • Enums
  • Delegates
  • Interface

Type Members
All the properties, members which resides in type are said as Type Members.

Type Member can have all access modifiers where as type can hace only 2 access modifiers 1] internal 2] public

Consider example below
   public class Student  
   {  
     public string Name;  
     public string Surame;  
     private int Class;  
     public void PrintDemo()  
     {  
       Console.WriteLine("Demo");  
     }  
   }  
  • In above example Student is the type.
  • All of its properties methods that resides in it are called as type member

No comments

Powered by Blogger.