I'm trying my best to describe this problem, but here it is:
Suppose now that I have a property type on one member of a class (instance):
Type t = propertyInfo.PropertyType;
How to declare or set some variable to get the result of a method call later using the out keyword?
t value; // Obviously doesn't compile, How do I declare this? // or this? //var value = default(t); // doesn't work someObject.GetData(out value);
The premise here is that I don't have someObject, and I'm stuck with this method call signature.
source share