Re: knowing the interfaces that an object implements
- From: Jon Skeet [C# MVP] <skeet@xxxxxxxxx>
- Date: Thu, 28 Apr 2005 17:32:54 +0100
Nick Hall <nickh@xxxxxxxxxxxxxxxxxx> wrote:
> It's not evaluated until runtime - therefore it actually does work. It uses
> the IL instruction isinst to make the determination.
The "if" does, but the call to Dispose should fail at compile time,
because the compiler doesn't know that connection implements
IDisposable. Of course, with Option Strict turned off it would be okay,
but personally I think type-safety is rather important :)
--
Jon Skeet - <skeet@xxxxxxxxx>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
.
- Follow-Ups:
- Re: knowing the interfaces that an object implements
- From: Nick Hall
- Re: knowing the interfaces that an object implements
- From: Jakob Christensen
- Re: knowing the interfaces that an object implements
- References:
- knowing the interfaces that an object implements
- From: Sanjay
- Re: knowing the interfaces that an object implements
- From: LOZANO-MORÁN, Gabriel
- Re: knowing the interfaces that an object implements
- From: Jakob Christensen
- Re: knowing the interfaces that an object implements
- From: Tiberiu Covaci[MCAD.NET]
- Re: knowing the interfaces that an object implements
- From: LOZANO-MORÁN, Gabriel
- Re: knowing the interfaces that an object implements
- From: Sanjay
- Re: knowing the interfaces that an object implements
- From: Jakob Christensen
- Re: knowing the interfaces that an object implements
- From: Jon Skeet [C# MVP]
- Re: knowing the interfaces that an object implements
- From: Nick Hall
- knowing the interfaces that an object implements
- Prev by Date: Re: Assembly Build #
- Next by Date: What is the point of making assemblies strong named?
- Previous by thread: Re: knowing the interfaces that an object implements
- Next by thread: Re: knowing the interfaces that an object implements
- Index(es):
Relevant Pages
|