jeudi 3 novembre 2016

Missing properties in instance of class

I'm writing generic method in Android app, and I have a problem with missing properties. My class has 7 public properties but when I'm trying to get all properties I'm getting list with one property.
Here is my code:

T item = (T)Activator.CreateInstance(typeof(T));
var properties = item.GetType().GetProperties();

Problem occurs in all classes.
I have the same code (also the same classes) in similar application for iOS and everything works fine.





Aucun commentaire:

Enregistrer un commentaire