471,310 Members | 961 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,310 software developers and data experts.

CodeDom: Equivaluent for: expression is type

Is there a possibility to generate a CodeDomExpression for an expression like

object obj = anything;

if (obj is Attribute)
...

For now, im using a workaround by creating the equivalent code:

if (
!object.ReferenceEquals(obj, null)
&&
typeof(Attribute).IsAsignableFrom(obj.GetType())
)
...

Mark
Feb 10 '06 #1
0 931

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Ron Bullman | last post: by
1 post views Thread by Raphael Iloh | last post: by
7 posts views Thread by Osvaldo Bisignano | last post: by
reply views Thread by Raphael Iloh | last post: by
3 posts views Thread by Alexey Lavnikov | last post: by
1 post views Thread by =?Utf-8?B?QU1lcmNlcg==?= | last post: by
reply views Thread by rosydwin | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.