Microsoft.Office.Interop.Word._Document接口有一个带有以下签名的方法:
void Close(ref object SaveChanges = Type.Missing, ref object OriginalFormat = Type.Missing, ref object RouteDocument = Type.Missing);
我有几个不太理解的问题:
- ref参数不能有默认值。
- 默认值必须是一个常量,而
Type.Missing
不是。 - 在调用此方法时,我可以使用
Close(false)
——通常情况下,ref参数需要一个可分配的变量? - 当导航到Visual Studio中
Type
的定义时,它会带我到_Document.Type属性,但这个属性没有名为Missing
的属性。这是VS中的一个错误吗?
System.Type.Missing
。