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...


2. I've a class Parent Class A and a Derived Class B. Here
is a scenario.
I've an instance of Class A as objA and an instance of Class
B as objB.

I can refer a child class variable as objB=objA, but
cannot do objA=objB what is the reason?



Answers were Sorted based on User's Feedback



2. I've a class Parent Class A and a Derived Class B. Here is a scenario. I've an instan..

Answer / gopal

Here ObjA is Base Class and ObjB is Derived Class.
In Inheritence Process Derived class Will get the all
features of Base Class.
because objB=O=objA Is COrrect

Is This Answer Correct ?    2 Yes 0 No

2. I've a class Parent Class A and a Derived Class B. Here is a scenario. I've an instan..

Answer / ashok

Is this you are trying to do?

class A
{
public int MyName { get; set; }
}

class B : A
{
public int MyName1 { get; set; }
}

public class TestAB
{
public static void Test()
{
A objA = new A();
B objB = new B();



objB = (B)objA; // Unable to cast object of type
'AdvanceLib.A' to type 'AdvanceLib.B'.
objA = objB;

}

}

---

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Dot Net AllOther Interview Questions

How do I prevent concurrent access to my data?

0 Answers  


12. Types of polymorphisem[Run and Design Exp.]

0 Answers   PCS,


What is the difference between .net mobile pages and ordinary .net web page? : Microsoft dot net mobile

0 Answers  


which tag i need to use manually to bind columns in a datagrid ?

2 Answers  


What are relation objects in dataset?

0 Answers  


what are the events for a form?

0 Answers   Six Sigma,


.net platform independent or dependent?

5 Answers   TCS,


9. Oop-Class A has m1 metthode Class B has m1 metthode and C is the calss that inharits A class, A class inharits B class. If Object dim c as new A() c.m1(), Tell me which mettode of class will call

2 Answers   PCS,


what are the fundamental and common properties of .net controls?

0 Answers   Six Sigma,


Explain <mobile:link> element .net mobile with example? : Microsoft dot net mobile

0 Answers  


what are the lifetime events of a from?

1 Answers   Six Sigma,


What is the cli? Is it the same as the clr?

0 Answers  


Categories