Hi friends,
I want to know How to implement access modifiers Protected, Internal and Protected Internal ?
Implement access modifiers Protected, Internal and Protected Internal
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.

VulpesRank #55 · 29.2K reputationPosted May 16, 2012, 8:16 AM EDT
SenthilkumarRank #387 · 6.5K reputationPosted May 17, 2012, 3:19 AM EDT
C# supports five types of access modifier. It sets previllage to the members, properties and methods in a class or struct or interface or abstract class.
private - can be accessed with in the class
public - can be accessed any where
protected - can be accessed with in the class and inherited class
internal - can be accessed with in the current assembly
protected internal - can be accessed with the current assembly and class inherits in the outside assembly.
public class Sample
{
private void number(int num)
{
this.num = num;
}
public int add(int a, int b)
{
return (a+b);
}
}
Hope this will help you.