A
Andrew Robinson
assuming that I have a class
public class MyClass {
public string FirstName {
get {...}
set {...}
}
}
how can I assign the FirstName property using reflection on a generic class
of type MyClass?
string propertyName = "FirstName";
C is a gerneric type of type "MyClass"
so what I want to do is:
C.propertyName = "Andrew"; // <-pseudo code...
For the simplicity, lets assume that the property is always of type string
but it could very (an I will know the type ahead of time.)
Thanks,
public class MyClass {
public string FirstName {
get {...}
set {...}
}
}
how can I assign the FirstName property using reflection on a generic class
of type MyClass?
string propertyName = "FirstName";
C is a gerneric type of type "MyClass"
so what I want to do is:
C.propertyName = "Andrew"; // <-pseudo code...
For the simplicity, lets assume that the property is always of type string
but it could very (an I will know the type ahead of time.)
Thanks,