|
|
i read this before and now either
i not getting what author is trying to say ...
any other topics which can tell me about the difference
|
|
|
|
|
The fundermental problem is there is a chance that a class can alter the behaviour (override) of a method in a base class. Now if 2 classes do this (override the same base class) and you inherit both these classes then you can have a situation where you dont know which implementation of that method you are calling.
There are other issues, but that is the one I can explain in the shortest amount of text.
-- oh and as far as interfaces go; as the interface does not define the implementation of the method, it is fine to implement multiple interfaces.
Keep your eyes open, you might spot alternatives.
|
|
|
|
|
That's just plain retarded, IMO. But the big question is, does VB really allow it ?
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Christian Graus wrote: That's just plain retarded
Really, I hope you are not refering to my example. I was trying to raise a point about it.
Keep your eyes open, you might spot alternatives.
|
|
|
|
|
thanx a lot
i got it by a small exp. from ur explanations
thax bye
|
|
|
|
|
Hello,
seeitsharper wrote: Now if 2 classes do this (override the same base class) and you inherit both these classes then you can have a situation where you dont know which implementation of that method you are calling.
If you are using Interfaces in a bad designed project (like seen here[^]), you could have simmilar problems.
All the best,
Martin
|
|
|
|
|
Yes, the core problem is bad design, which is why C# should support MI, because it can be very useful in good designs.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Christian Graus wrote: which is why C# should support MI, because it can be very useful in good designs
Can be said loud and proud!!
All the best,
Martin
|
|
|
|
|
Perhaps in an unsafe context?
Meaning only that unsafe indicates to the compiler, "I know what I'm doing, let me through."
Hmmm... maybe unsafe could also be used to allow fall-through in switch es...
|
|
|
|
|
I realy enjoy reading, when you are talking to yourself.
Like this one[^]!
All the best,
Martin
|
|
|
|
|
Glad to be of service.
|
|
|
|
|
class c
{
void i1.function_some()
{
// body
}
void i2.function_some()
{
// body
}
}
class c1:c
{
c dd =new c();
i1 i=(i1)dd;
i.funcion_some();-----gets the function of interface i1 in class c
i2 i_d=new c();
i_d.function_some();---gets the function of interface i2 in class c
with the help of type casting i can get the individual definition of the functions
}
i think this will lead to some ambguity...!
|
|
|
|
|
No, the point I was making was that you are inheriting behaviour. Interfaces have no behviour thus the problem is different. I agree on the what constitutes Good and bad design and perhaps Microsoft could have came up with a MI solution that worked.
Keep your eyes open, you might spot alternatives.
|
|
|
|
|
You're kidding - VB.NET has multiple inheritance ?
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
kalyan_2416 wrote: i am not understanding y it is not there in c# and there in vb
I doubt that VB.NET has multiple inheritance because it is a limitation of the CLR rather than the language.
-- Always write code as if the maintenance programmer were an axe murderer who knows where you live.
Upcoming FREE developer events:
* Glasgow: Agile in the Enterprise Vs. ISVs, Mock Objects, SQL Server CLR Integration, Reporting Services, db4o ...
* Reading: SQL Bits
My website
|
|
|
|
|
That's what I thought, too.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
|
That's cool, I was just interested, because if you were right, it meant I was learning something for the night
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Again, a stupid downvoter on your side!
What are you doing to people here?
Are you sending spam mails over your account, or is it rude for somebody that you try to help?
Got my 5
All the best,
Martin
|
|
|
|
|
i m sorry for that
i happy for the response..
i am here to learn...
i am not rude on anyone as such!!!!!!!!!!
|
|
|
|
|
Got my 5 for that!
All the best,
Martin
|
|
|
|
|
Martin# wrote: What are you doing to people here?
I have no idea. I can only guess that I gave someone some advice they didn't actually want to hear.
-- Always write code as if the maintenance programmer were an axe murderer who knows where you live.
Upcoming FREE developer events:
* Glasgow: Agile in the Enterprise Vs. ISVs, Mock Objects, SQL Server CLR Integration, Reporting Services, db4o ...
* Reading: SQL Bits
My website
|
|
|
|
|
How to send the input to the crystal report form the main forms
|
|
|
|
|
Hi all,
I am having an doubt, dnt mistake if it's really silly or wrong. My doubt is i am getting some data's from database and binding it in dataset later to dataview. After binding in the dataview i am filtering the data using rowfilter, the data's which satisfies the rowfilter condition are moved to datagridview using dataset. My doubt, is it possible to get the remaining data's(alone) which does not satisfies the rowfilter condition to another dataset?
For eg:
Data's from database
ID Name
1 AAA
2 BBB
3 EEE
4 AAA
5 AAA
In the dataview rowfilter i am getting the names "AAA" and binding it to Grid, i want to get other names also to another dataset, is it possible to do it without using another dataview??
Thanks in advance
Know is Drop, Unknown is Ocean
|
|
|
|