StandardFormat(Char, Byte) Constructor

Definition

Important

Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.

Initializes a new instance of the StandardFormat structure.

C#
public StandardFormat(char symbol, byte precision = 255);

Parameters

symbol
Char

A type-specific format specifier, such as 'G', 'D', or 'X'.

precision
Byte

An optional precision ranging from 0 to 99, or the special value NoPrecision (the default).

Exceptions

symbol is not NoPrecision, and its value is greater than MaxPrecision.

-or-

symbol cannot be converted to a Byte.

Applies to

Product Versions
.NET Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Standard 2.0 (package-provided), 2.1