K
Ken Kast
I want to be able to determine to which field in a class a particular object
refers. In other words, I have (in C#)
class MyClass
{
private object myField;
}
x = new MyClass();
object y = new object();
x.myField = y;
I want to pass y into a method, which knows about MyClass, and have it
determine that y defines myField. I know that I can determine the names and
types of fields via reflection. Is there a way to match up field instances?
Ken
refers. In other words, I have (in C#)
class MyClass
{
private object myField;
}
x = new MyClass();
object y = new object();
x.myField = y;
I want to pass y into a method, which knows about MyClass, and have it
determine that y defines myField. I know that I can determine the names and
types of fields via reflection. Is there a way to match up field instances?
Ken