using System;
class BC
{
private void Method1()
{
Console.WriteLine("I'm not accessible out side the Class");
}
public void Method2()
{
Console.WriteLine("I'm accessible Everywhere");
}
protected void Method3()
{
Console.WriteLine("I'm accessible to only BC & DC");
}
}
|
Class BC
Private Sub Method1()
Console.WriteLine("I'm not accessible out side the Class")
End Sub
Public Sub Method2()
Console.WriteLine("I'm accessible Everywhere")
End Sub
Protected Sub Method3()
Console.WriteLine("I'm accessible to only BC & DC")
End Sub
End Class
|