更新:2007 年 11 月
错误消息
控制离开当前方法之前必须对输出参数“parameter”赋值在方法体中没有给用
下面的示例生成 CS0177:
复制代码 | |
---|---|
// CS0177.cs public class MyClass { public static void Foo(out int i) // CS0177 { // uncomment the following line to resolve this error // i = 0; } public static void Main() { int x = -1; Foo(out x); } } |