|
The 2nd method you're not instantiating class A, you're instantiating class B
|
|
|
|
|
|
Difference between in Ist Method and IInd Method
Ist Method returns. "Hello"
IIst Method returns. "Fine"
spaps
|
|
|
|
|
|
Nope !!!!
The same output = "Fine"
|
|
|
|
|
if you do like this:
A e = new A();
e.get();
B c = new B();
c.get();
you will have Hello and Fine too..
spaps
|
|
|
|
|
yes it's correct
but if we have
A e = new B(); //Upcasting
e.get();
we will have "Fine"
|
|
|
|
|
lisan_al_ghaib wrote: A e = new B()
sorry...that's my fault
spaps
|
|
|
|
|
You'll get the same output in both cases because, even though you are using class A in the 1st method, you are instantiating an instance of class B (because B inherits from A). What you can't do here, is access methods of B that aren't in A.
|
|
|
|
|
.NET- India wrote: Ist Method
A e = new B();
e.get();
IInd Method
B e = new B();
e.get();
Difference between in Ist Method and IInd Method of intializing the object of the the Class A
The question can not be answered, as it's incorrect. Neither of the two methods creates an instance of the A class.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
This idiot cannot figure out how to use Google to answer his homework questions and likes to ask the same question again.
Blog link to be reinstated at a later date.
|
|
|
|
|
This idiot knws very well how to use google at it's best. But i think u've a lot of free time to waste writing such a stupid or worthless answer ??????????????????????????????. If you think this is very easy question why dont u explain the solution to the probs i'm facing and for kind very information i got a solution myself. But u r the genios or the champ of champions so explain the main diff ??????????????????????????
waiting for ur reply
|
|
|
|
|
*yawn*
Blog link to be reinstated at a later date.
|
|
|
|
|
how to pass data between two forms using c# classes.
please help.
thank you.
|
|
|
|
|
Maite, I would suggest you to buy a book and start reading...
There is no point of asking these type of questions on any of the forums
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
maybe you should use the Constructor to send the class as a parameter..
spaps
|
|
|
|
|
|
Example[^] I gave a few weeks ago
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)Expect everything to be hard and then enjoy the things that come easy. (code-frog)
|
|
|
|
|
is there any sample code show how to send audio file using rtp and c# or telling me the steps to do that
thanks in advance
|
|
|
|
|
The data sent is going to be the same in any language.
Sending arrays of bytes using a socket is easy. What bytes
to send is the "tricky" part - study the RTP specification!
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Halo Frnds,
What is the difference between Instance and Object in C#
|
|
|
|
|
Instance refers to the copy of the object at a particular time whereas object refers to the memory address of the class.
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
Class A
{
public void get()
{
Console.WriteLine("Hello");
}
}
Public Static Void Main(..)
{
A e=new A();/b>
e.get();
}
Here, A e=new A(); is instance or object
Can you expain a bit more
|
|
|
|
|
A is the object,
and e is the Instance,
through the instance you can access the method you have in the Class, you cannot access to the method without creating the instance...
spaps
|
|
|
|
|
Its an instance of an object
|
|
|
|