หมายเหตุ
การเข้าถึงหน้านี้ต้องได้รับการอนุญาต คุณสามารถลอง ลงชื่อเข้าใช้หรือเปลี่ยนไดเรกทอรีได้
การเข้าถึงหน้านี้ต้องได้รับการอนุญาต คุณสามารถลองเปลี่ยนไดเรกทอรีได้
The out parameter 'parameter' must be assigned to before control leaves the current method
A parameter marked with the out keyword was not assigned a value in the method body. For more information, see Passing Parameters
The following sample generates 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);
}
}
ทํางานร่วมกับเราใน GitHub
แหล่งที่มาสำหรับเนื้อหานี้สามารถพบได้บน GitHub ซึ่งคุณยังสามารถสร้างและตรวจสอบปัญหาและคำขอดึงข้อมูลได้ สำหรับข้อมูลเพิ่มเติม ให้ดูคู่มือผู้สนับสนุนของเรา