הערה
הגישה לדף זה מחייבת הרשאה. באפשרותך לנסות להיכנס או לשנות מדריכי כתובות.
הגישה לדף זה מחייבת הרשאה. באפשרותך לנסות לשנות מדריכי כתובות.
A partial method cannot have out parameters
A partial method cannot have an out parameter. Out parameters are not allowed because if the partial method is removed by the compiler then there is no guarantee that the out parameter is ever assigned.
- Remove the out modifier from the parameter and use the return value of the method instead, or else remove the partial modifier from the method declaration.
The following code generates CS0752:
// cs0752.cs
public partial class C
{
partial void Part(out int num); // CS0752
// try the following line instead
// partial void Part(int num);
public static int Main()
{
return 1;
}
}
משוב של .NET
.NET הוא פרויקט קוד פתוח. בחר קישור כדי לספק משוב: