There are a class A. Another class B derived from it.
Now if I do A a = new B(); and B b = new B(); What will
happen in both the statements. And what is the difference
between these two statements.
Answer Posted / ashok kumar
A is a base class, B is a derived class.
Which means we cad access all the data of A class in B class.
A a=new B();// Creating object for A class(can access the A
class data only).
B b=new B();// Creating object for B class(can access the
A,B class data).
|Is This Answer Correct ?||12 Yes||3 No|
What does console writeline do?
Write the syntax for catching an exception in c#?
What is the difference between struct and class c#?
Explain briefly the difference between value type and reference type?
How to update the gui from another thread in c#?
What is difference between int and int32 in c#?
What is string concatenation?
When a switch is said to be congested?
Can we inherit abstract class in c#?
What is a reference type c#?
How to get the sum of last 3 items in a list using lambda expressions?
What does an indexer do?
Why do we use lambda expression in c#?
What is datagridview in c#?
What is difference between internal and protected internal in c#?