Compiler Error CS1021
Integral constant is too large
A value represented by an integer literal is greater than UInt64.MaxValue.
The following sample generates CS1021:
// CS1021.cs
class Program
{
static void Main(string[] args)
{
int a = 18_446_744_073_709_552_000;
}
}
The following code also generates CS1021:
using System.Numerics;
class Program
{
static void Main(string[] args)
{
var a = new BigInteger(18_446_744_073_709_552_000);
}
}
For information about how to instantiate a System.Numerics.BigInteger instance whose value exceeds the range of the built-in numeric types, see the Instantiating a BigInteger Object section of the BigInteger reference page.
Surađujte s nama na GitHubu
Izvor za ovaj sadržaj možete pronaći na GitHubu, gdje možete stvarati i pregledavati probleme i zahtjeve za povlačenjem. Dodatne informacije potražite u našem vodiču za suradnike.
Povratne informacije
https://aka.ms/ContentUserFeedback.
Stiže uskoro: Tijekom 2024. postupno ćemo ukinuti servis Problemi sa servisom GitHub kao mehanizam za povratne informacije za sadržaj i zamijeniti ga novim sustavom za povratne informacije. Dodatne informacije potražite u članku:Pošaljite i pogledajte povratne informacije za