Get default value of class member ( C# )
Posted
by Ruben Aster
on Stack Overflow
See other posts from Stack Overflow
or by Ruben Aster
Published on 2010-06-07T13:54:30Z
Indexed on
2010/06/07
14:02 UTC
Read the original article
Hit count: 248
Let's assume I have a class ClassWithMember
class ClassWithMember
{
int myIntMember = 10;
}
How do I get the default value 10 of the myIntMember member by System.Type?
I'm currently struggling around with reflections by all I retreive is the default value of int (0) not the classes default member (10)..
© Stack Overflow or respective owner