In this code snippet we will discuss about how to access parent class data member from derived class.
If you want access parent class data member in the
derived class then use ‘base’ keyword. In the derived class we can
access all the data members (Public, Protected, internal, protected
internal) of parent class other than private data
member.
Example:
public class AcessBaseDataMe
{
public static void
{
DerivedClass obj =
obj.Get_Base_
obj.Get_Derived_
Console.Read();
}
}
public class BaseClass
{
protected int i = 10;
}
public class DerivedClass:B
{
int i = 20;
public void Get_
{
Console.WriteLine(
}
public void Get_
{
Console.WriteLine(
}
}
|
Output:
|
2 Comments:
Then it is important to apply general amount involving any medical cream like Clearasil on your own face.
Another available treatment option that can be done at home without a prescription is a topical ointment.
This sounds drastic but as long as you pay due care and attention
when carrying the task out the removal should happen without a hitch.
My web blog - Wart Removal
Mortgage expenses also include appraisals and commissions
paid. Robert Shumake's mission is to inform the public about mortgage fraud and real estate scams and to provide tips on how to avoid being a victim. Property - Hookp takes uses advanced link building and promotion tools to optimize your profile for search engine ranking.
Stop by my blog; Asunnot
Post a Comment