I tried that, but VB's equivalent TypeOf statement can only be used in an If
statement and it can only compare against a hardcoded type, rather than type
object. It sucks...
"Jon Skeet" <skeet@pobox.com> wrote in message
news:MPG.19cabe9ca1a6b25398969a@news.microsoft.com ...[color=blue]
> Jeff Molby <JeffMolby@C_mc_st.n_t> wrote:[color=green]
> > First off, this is a VB application, but I know you C# are used to[/color][/color]
working[color=blue][color=green]
> > at the lower levels like this, so I'm hoping this is an easy one for[/color][/color]
you.[color=blue][color=green]
> > Then you can continue to feel superior to us VB-types <G> BTW, I am[/color][/color]
somewhat[color=blue][color=green]
> > proficient in C#, but my bosses and coworkers barely know VB, so no, I[/color][/color]
can't[color=blue][color=green]
> > just rewrite it in C# <g>
> >
> > Ok, I've googled long and hard, but I can't find anything relevant on[/color][/color]
this[color=blue][color=green]
> > one. I am now at the mercy of your good nature. <g>[/color]
>
> <snip>
>[color=green]
> > CommonAssembly =
> > System.Reflection.Assembly.LoadFrom("C:\Documents and[/color][/color]
Settings\mjozwik_2\My[color=blue][color=green]
> > Documents\Visual Studio
> > Projects\BookWorks\BookWorksCommon\bin\BookWorksCo mmon.dll")[/color]
>
> I don't think you should load the common assembly by reflection - just
> use the VB.NET equivalent of the C# "typeof" operator to get the common
> type and cast to that.
>
> I *think* that's probably the problem, but I wouldn't like to say for
> sure.
>
> --
> Jon Skeet - <skeet@pobox.com>
>
http://www.pobox.com/~skeet
> If replying to the group, please do not mail me too[/color]