Getting A Type Cross-Assembly

Every once and awhile I find the need to get a reference to a Type maintained in a separate assembly. This tends to happen when I am loading assemblies at runtime and am trying to build an instance of a known Type in that assembly. In fact, this is how my XmlProvider class builds instances. Well I have found that the built in System.Reflection.Emit.TypeBuilder.GetType(…) method does not deal well with these advanced situations. So here is a very inefficient, brute force method for getting the Type object you need. Also note that I have included some tags for cross-platform compatibility. I am still looking for a workaround for the Zune and Xbox 360.

No Comments

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a comment

You must be logged in to post a comment.

WordPress Themes