Bilješka
Pristup ovoj stranici zahtijeva provjeru vjerodostojnosti. Možete pokušati da se prijavite ili promijenite direktorije.
Pristup ovoj stranici zahtijeva provjeru vjerodostojnosti. Možete pokušati promijeniti direktorije.
Cannot bind delegate to 'member' because it is a member of 'type'
You cannot bind delegates to members of Nullable
value types.
Example
The following sample generates CS1728:
// CS1728.cs
class Test
{
delegate T GetT<T>();
delegate T GetT1<T>(T t);
delegate bool E(object o);
delegate int I();
delegate string S();
static void Main()
{
int? x = null;
int? y = 5;
GetT<int> d1 = x.GetValueOrDefault; // CS1728
GetT<int> d2 = y.GetValueOrDefault; // CS1728
GetT1<int> d3 = x.GetValueOrDefault; // CS1728
GetT1<int> d4 = y.GetValueOrDefault; // CS1728
}
}
Sarađujte s nama na GitHub-u
Izvor za ovaj sadržaj može se naći na usluzi GitHub, gdje takođe možete da kreirate i pregledate probleme i povučete zahtjeve. Za više informacija pogledajte naš vodič za saradnike.