Is there a way to put a variable in place of a property name of an object? Not sure if that makes much sense but I will post a sample:
Code:
public void Blah(string PropertyName) {
int Foo = Object.Property1.Property2;
}
What I need to do is have the contents of the variable PropertyName go in place of Property1. Can that be done?