G
Guest
I've never messed with Reflection at all, so I am unsure of where to start.
All of the documentation/articles I've found aren't helping much, or are too
complex for what I need.
All I need to do is take an assembly that only contains one type and
retrieve the value of a property (that has a known name).
I've tried using something like this that I found in some documentation:
Dim x As [Assembly] = [Assembly].LoadFile("someAsm.dll")
Dim t As Type = x.GetTypes(0)
Dim m As PropertyInfo = t.GetProperty("propName")
Dim obj As Object = Activator.CreateInstance(t)
Dim i As Integer = m.GetValue(<ok what is supposed to go here?>)
I'm not sure what the getvalue method is supposed to take as arguments. Am I
even doing this right?
Thanks
All of the documentation/articles I've found aren't helping much, or are too
complex for what I need.
All I need to do is take an assembly that only contains one type and
retrieve the value of a property (that has a known name).
I've tried using something like this that I found in some documentation:
Dim x As [Assembly] = [Assembly].LoadFile("someAsm.dll")
Dim t As Type = x.GetTypes(0)
Dim m As PropertyInfo = t.GetProperty("propName")
Dim obj As Object = Activator.CreateInstance(t)
Dim i As Integer = m.GetValue(<ok what is supposed to go here?>)
I'm not sure what the getvalue method is supposed to take as arguments. Am I
even doing this right?
Thanks