dimanche 4 octobre 2015

Getting a list of attributes and its type of class

I pretty sure that this problem has been solved previously here but I do not know even the suitable keyword to search for.

Is it possible in C# to get list of a class or struct attributes and their types in run-time?

P.S. the struct is defined with [StructLayout(LayoutKind.Sequential)] if this makes difference.

Edit

I found this How to get the list of properties of a class?

now the question is : does [StructLayout(LayoutKind.Sequential)] makes any difference ?





Aucun commentaire:

Enregistrer un commentaire