C#访问有缺省参数的函数
C# 不能编写有缺省参数的函数,但是可以调用这样的函数,获取参数默认值的方法是调用 Type.Missing 。如下:
object template = "";
object missingValue = Type.Missing;
app.Documents.Add(ref template, ref missingValue,
ref missingValue, ref missingValue);
C# 不能编写有缺省参数的函数,但是可以调用这样的函数,获取参数默认值的方法是调用 Type.Missing 。如下:
object template = "";
object missingValue = Type.Missing;
app.Documents.Add(ref template, ref missingValue,
ref missingValue, ref missingValue);