Total Page Preview:   000000000554

What are access modifier and it basic type in English and Hindi

 

Access modifier and it basic type in English:

In C#, access modifiers are used to specify the accessibility or visibility of class members (fields, methods, properties, etc.) from other parts of the program. There are five access modifiers in C#, each with its own level of accessibility:

1-public:
Public members are accessible from any code in the same assembly or any referencing assembly.
For example:
 
2-private:
Private members are only accessible within the same class.
For example:
 
3-protected:
Protected members are accessible within the same class and any derived classes.
For example:
 
4-internal:
Internal members are accessible from any code within the same assembly, but not from other assemblies.
For example:
 
5-protected internal:
Protected internal members are accessible within the same assembly, and from any derived classes, regardless of which assembly they are in.
For example:
 

Access modifier and it basic type in Hindi:

Access modifier OOPs ke important concepts mein se ek hai, jiski madad se hum class members (fields, properties, methods, etc.) ko define aur access kar sakte hai. Access modifier ke prakar niche diye gaye hai:
1-Public Access Modifier: Public access modifier se class members ko kisi bhi scope se access kar sakte hai.
 
 
2-Private Access Modifier: Private access modifier se class members ko sirf wohi class access kar sakte hai, jisme ye member define kiya gaya hai.
 
 
3-Protected Access Modifier: Protected access modifier se class ke derived classes mein ye member access kar sakte hai, lekin baaki classes aur programs se ye member access nahi ho sakta.
 
 
4-Internal Access Modifier: Internal access modifier se class members ko current assembly ke baki classes access kar sakte hai, lekin dusri assemblies se ye member access nahi ho sakta.
 
 
 
 
 
 
 

Thank You

About Author

Brijesh Kumar

Database Developer

I have more then 6 years Experience in Microsoft Technologies - SQL Server Database, ETL Azure Cloud - Azure SQL Database, CosmosDB, Azure Data Factory, PowerBI, Web Job, Azure Function, Azure Storage, Web Apps, Powershall and Database Migration On-Premise to Azure Cloud.
LinkedIn : https://www.linkedin.com



Comments


                           
                           

                           

                           

Facebook User: