Sorry, not sure I understand the question. On properties, working with my
original example the following should work:
//'C# side
public string SomeProp{get{return "Hi";}}
'// VB side
Dim pi As PropertyInfo = t.GetProperty("SomeProp")
MessageBox.Show(pi.GetValue(o, Nothing))
Now, I feel I must reiterate my suggestion to go down the wrapper route.
Just a bunch of thin C# proxy objects will be easier to code against and
faster at runtime and easier to maintain for the future.
If you insist on the reflection path, I suggest you code against the library
as you normally would (not all of it has to compile) and then translate
that code using reflection one step at a time.
Cheers
Daniel
--
http://www.danielmoth.com/Blog/
"Benjamin Lukner" <(E-Mail Removed)> wrote in
message news:(E-Mail Removed)...
> Hi!
>
> I tried, but still have a problem...
> The naming collision is between a control and a class.
> I now can access the class, but I don't know how to access its properties:
>
> Dim oSettings As xxx = New xxx
>
> Dim t1 As Type = oSettings.GetType
> Dim t As Type
> Dim mis() As System.Reflection.MemberInfo
> Dim mi As System.Reflection.MemberInfo
> Dim pi As System.Reflection.PropertyInfo
>
> mis = t1.GetMember("UPCEan")
> mi = mis(0) ' Now I have access to my class
>
> t = mi.GetType ' !! This is the code line that does not work
> ' !! because I get System.MemberInfo, of course
>
> pi = t.GetProperty("EnableUPCA") ' Returns Nothing
> pi.SetValue(pi, True, Nothing)
>
>
> Is it possible to convert the MemberInfo to its original class or get
> access to its members anyway?
>
>
> Kind regards,
>
> Benjamin Lukner