Can 'is' followed by cast by optimized away
- From: "Thorsten Ottosen" <thote@xxxxxxxxxx>
- Date: Mon, 11 Jul 2005 13:24:09 +0200
Hi,
Can the following ugly type-switching code by optimized
by the compiler/jitter?:
object o = ...;
if( o is Foo )
return (Foo)o;
Arguably, the cast is guranteed to succeed, but do the
compiler take advantage of that?
If yes, would it be possible to each that conclusion
by looking at the assembler output?
Thanks
-Thorsten
.
- Follow-Ups:
- Re: Can 'is' followed by cast by optimized away
- From: Hans Kesting
- Re: Can 'is' followed by cast by optimized away
- Prev by Date: Re: EMAIL on Win98
- Next by Date: Re: Can 'is' followed by cast by optimized away
- Previous by thread: How to call .bat file from .NET?
- Next by thread: Re: Can 'is' followed by cast by optimized away
- Index(es):
Relevant Pages
|