הערה
הגישה לדף זה מחייבת הרשאה. באפשרותך לנסות להיכנס או לשנות מדריכי כתובות.
הגישה לדף זה מחייבת הרשאה. באפשרותך לנסות לשנות מדריכי כתובות.
Unexpected use of an unbound generic name
This error occurs if you use a generic type needing one parameter type without passing any generic parameter type name between the angle brackets. This use may be a variable declaration, or an object instantiation.
The following example generates CS7003:
// CS7003.cs
using System.Collections.Generic;
class Program
{
static void Main(string[] args)
{
var myDictionary = new Dictionary< , >(); //CS7003
List<> var2; //CS7003
}
}
Provide the expected parameter type names in angle brackets, separated by commas, when using a generic type.
The previous example could be fixed as follows :
// CS7003-fixed.cs
using System.Collections.Generic;
class Program
{
static void Main(string[] args)
{
var myDictionary = new Dictionary<int, string>();
List<string> var2;
}
}
משוב של .NET
.NET הוא פרויקט קוד פתוח. בחר קישור כדי לספק משוב: