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.
The type of the argument to the DefaultParameterValue attribute must match the parameter type
This error is generated when you pass a value of the wrong type to DefaultParameterValueAttribute. Ensure the type of the attribute argument matches that of the target parameter.
Example
The following sample generates CS1908:
// CS1908.cs
// compile with: /target:library
using System.Runtime.InteropServices;
public interface ISomeInterface
{
void Bad([DefaultParameterValue("true")] bool b); // CS1908
void Good([DefaultParameterValue(true)] bool b); // OK
}
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.