I'm using reflection to get the properties of an object and there's no difficulty in that but I need to make my class even more generic so basically what I'm trying to do is the following:
PropertyInfo[] properties = (typeof ("ObjectName")).GetProperties(BindingFlags.Public | BindingFlags.Instance);
Or something similar. Notice the use of a string inside the typeof. I know this doesn't work, this is just to show what I'm trying to accomplish. I've also tried:
public void Test(object myObject)
{
typeof(myObject.GetType());
Type myType = myObject.GetType();
typeof(myType);
}
with no success.