Erreur du compilateur CS0664
Mise à jour : novembre 2007
Message d'erreur
Littéral de type double ne peut pas être converti implicitement en type 'type' ; utilisez un suffixe 'suffixe' pour créer un littéral de ce type
Literal of type double cannot be implicitly converted to type 'type'; use an 'suffix' suffix to create a literal of this type
Une assignation n'a pas pu être terminée ; utilisez un suffixe pour corriger l'instruction. La documentation de chaque type identifie le suffixe correspondant du type.
L'exemple suivant génère l'erreur CS0664 :
// CS0664.cs
class M
{
static void Main()
{
decimal m = 1.0; // CS0664
// try the following line instead
// decimal m = 1.0M;
System.Console.WriteLine(m);
}
}