C#访问有缺省参数的函数

C# 不能编写有缺省参数的函数,但是可以调用这样的函数,获取参数默认值的方法是调用 Type.Missing 。如下:

object template = "";
object missingValue = Type.Missing; 
app.Documents.Add(ref template, ref missingValue,
    ref missingValue, ref missingValue);

posted on 2004-06-25 17:43  吃睡长  阅读(213)  评论(0)    收藏  举报

导航