[英]Determining the default() value of a class in C#
MSDN's documentation on standard C# classes doesn't seem to contain what the default
value for that type is. MSDN关于标准C#类的文档似乎不包含该类型的default
值。 Am I not looking in the right place? 我不是在寻找合适的地方吗? Specifically, I am trying to figure out what the default
value of XElement
is. 具体来说,我试图弄清楚XElement
的default
值是什么。
I can always run my program and figure it out then, but I'd like a way to avoid that, if possible. 我总是可以运行我的程序并将其弄清楚,但如果可能的话,我想要一种方法来避免这种情况。
Edit: This page shows the default values for the native types, but I'm wondering about complex types. 编辑: 此页面显示本机类型的默认值,但我想知道复杂类型。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.