interview question asked in MNC

Posted by Krishnamanohar under C# on 5/2/2013 | Points: 10 | Views : 2582 | Status : [Member] | Replies : 5
Hi Experts,
what is the menaning of Class B:A{ }means................
Regards
Krish




Responses

Posted by: Kmandapalli on: 5/2/2013 [Member] Silver | Points: 25

Up
0
Down
Hi,

If you want to know about this, you have to get idea about inheritance concept.
class B : A means
class B inherits the properties declared by class A.
Mark as answer if u are satisfied.

Regards,
Shree M.


Kavya Shree Mandapalli

Krishnamanohar, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Krishnamanohar on: 5/2/2013 [Member] Starter | Points: 25

Up
0
Down
Hi
am not asking this
ClassB:A
{
}
i am asking this
ClassB :A{ }
{
}
what does it mean?
Thanks in Advance
Krish

Krishnamanohar, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Kmandapalli on: 5/2/2013 [Member] Silver | Points: 25

Up
0
Down
Hi,

There is no such kind of syntax.
The interviewer has just tested you.

Mark as answer if satisfied...

Regards,
Shree M.



Kavya Shree Mandapalli

Krishnamanohar, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Niladri.Biswas on: 5/2/2013 [Member] Platinum | Points: 25

Up
0
Down
It should not be

ClassB :A{ } 

{
}


but

ClassB :A{ } 


which means class B inherits class A i.e. A is base class while B is the child class


Best Regards,
Niladri Biswas

Krishnamanohar, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Ankitsrist on: 5/3/2013 [Member] Starter | Points: 25

Up
0
Down
there is no such thing
it should be like class B:A
{
}

Krishnamanohar, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response