Anteckning
Åtkomst till den här sidan kräver auktorisering. Du kan prova att logga in eller ändra kataloger.
Åtkomst till den här sidan kräver auktorisering. Du kan prova att ändra kataloger.
Implicitly typed locals cannot have multiple declarators.
Multiple declarators are allowed in explicit type declarations, but not with implicitly typed variables.
To correct this error
- Declare and assign a value to each implicitly typed local variable on a separate line.
Example
The following code generates CS0819:
// cs0819.cs
class A
{
public static int Main()
{
var a = 3, b = 2; // CS0819
return -1;
}
}