Morning,
I am trying to use reflection to iterate all properties in one of my classes :
public MDInstrument() : base()
{
PropertyInfo[] properties = typeof(MDInstrument).GetProperties();
foreach (PropertyInfo item in properties)
{
var tick = item as TickData;
}
}
when I inspect the var properties I can see all the properties correctly
but on the line:
var tick = item as TickData;
I am getting the error:
Aucun commentaire:
Enregistrer un commentaire