Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


When you inherit a protected class-level variable, who is it
available to?

Answers were Sorted based on User's Feedback



When you inherit a protected class-level variable, who is it available to?..

Answer / kirti

Derived Classes.

Is This Answer Correct ?    1 Yes 0 No

When you inherit a protected class-level variable, who is it available to?..

Answer / venu gopal

Classes in the same namespace.

Is This Answer Correct ?    1 Yes 1 No

When you inherit a protected class-level variable, who is it available to?..

Answer / kiran

//When you inherit a protected class-level variable, who is
it available to?
//Answer is classes within the same namespace
namespace SameNamespace
{
class MyBaseClass
{
protected int myprotectedint;

}
class MyDerivedClass:MyBaseClass
{
public int GetProtectedMember()
{
return myprotectedint;
}
public MyDerivedClass(int myvalue)
{
myprotectedint = myvalue;
}

}

class MyTest
{
public static void Main()
{
MyDerivedClass mdc = new MyDerivedClass(12);

Console.WriteLine(mdc.GetProtectedMember());
Console.ReadKey();
}
}
}

Is This Answer Correct ?    0 Yes 0 No

When you inherit a protected class-level variable, who is it available to?..

Answer / kirti

The derived class.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C Sharp Interview Questions

Can you put two constructor with the same structure in a class?

0 Answers  


Explain how to implement an object pool in c#.net

0 Answers  


Are private class-level variables inherited?

5 Answers  


How do I create a new form in c#?

0 Answers  


How can encapsulation be achieved?

0 Answers  


What is parameterized constructor?

0 Answers  


What’s thread.sleep() in threading ?

0 Answers  


Explain constructor.

7 Answers   Wipro,


What is option parameter in C#?

0 Answers  


Which is the base class in c#?

0 Answers  


In gridview in editmode if we want to display information in one combobox based on

0 Answers   FD, Microsoft,


What?s the difference between System.String and System.StringBuilder classes?

1 Answers  


Categories