Re: implicit cast operator funny-ness
- From: "Pieter Breed" <pieter.breed@xxxxxxxxx>
- Date: 6 Apr 2006 01:23:00 -0700
Thanks for the trouble Jon, I appreciate it.
I suppose it is one of those things that make sense if you think about
it... The compiler does not know when of the million possible implicit
conversions that might exist to classes that all might impliment the
specific interface you are thinking of, to use:
interface IB
{
}
class B1 : IB
{
}
class B2 : IB
{
}
class A
{
public static implicit B1( A a ) { };
public static implicit B2( A a ) { };
}
so assigning A to an IB will cause who knows what, right?
Regards,
Pieter
.
- References:
- implicit cast operator funny-ness
- From: Pieter Breed
- Re: implicit cast operator funny-ness
- From: Nicholas Paldino [.NET/C# MVP]
- Re: implicit cast operator funny-ness
- From: Jon Skeet [C# MVP]
- Re: implicit cast operator funny-ness
- From: Pieter Breed
- Re: implicit cast operator funny-ness
- From: Jon Skeet [C# MVP]
- Re: implicit cast operator funny-ness
- From: Jon Skeet [C# MVP]
- implicit cast operator funny-ness
- Prev by Date: Re: Bitmap/Image data type
- Next by Date: Wizard SideBar
- Previous by thread: Re: implicit cast operator funny-ness
- Next by thread: Re: multiple inheritance
- Index(es):
Relevant Pages
|