Background and motivation
To quickly and easily get the number of decimal places of a decimal. Like SqlDecimal.
API Proposal
namespace System
{
public struct Decimal // : ...
{
+ // Gets the number of decimal places.
+ public byte Scale { get; }
}
}
API Usage
decimal foo = 1.234m;
Console.WriteLine(foo.Scale); // 3
Alternative Designs
No response
Risks
No response
Background and motivation
To quickly and easily get the number of decimal places of a decimal. Like
SqlDecimal.API Proposal
namespace System { public struct Decimal // : ... { + // Gets the number of decimal places. + public byte Scale { get; } } }API Usage
Alternative Designs
No response
Risks
No response