docs
docs copied to clipboard
gRPC implementation of decimal for decimal.MaxValue / decimal.MinValue
I have a question about the decimal implementation here
The provided example does not handle decimal.MaxValue or decimal.MinValue (please see a screenshot below). Is it by all right to assume that in some cases decimal overflows ulong? Or is it better to come up with something can handle big decimals?
For now I can only think of storing everything as a string, but maybe there are more optimal solutions?
e.g. with decimal.MaxValue

Any pieces of advice are welcome
Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
- ID: c2a41d02-3084-c31e-98ed-2bd786c7a301
- Version Independent ID: 31a20696-f326-63c3-77d1-f3cfc0aa589c
- Content: Protobuf scalar data types - gRPC for WCF developers
- Content Source: docs/architecture/grpc-for-wcf-developers/protobuf-data-types.md
- Product: dotnet-architecture
- Technology: grpc
- GitHub Login: @shirhatti
- Microsoft Alias: soshir
Hi @MihailsKuzmins, thanks for your query. Similar issue is discussed in #31136. Hope the comment https://github.com/dotnet/docs/issues/31136#issuecomment-1249183251 helps.
The issue can be closed.
Sorry for my delayed response. Thank you for the information. Hopefully in the future there is a better solution than just parsing the decimal as a string