StandardFormat StandardFormat StandardFormat StandardFormat Struct

Definition

Represents a standard format string without using an actual string.

public value class StandardFormat : IEquatable<System::Buffers::StandardFormat>
public struct StandardFormat : IEquatable<System.Buffers.StandardFormat>
type StandardFormat = struct
Public Structure StandardFormat
Implements IEquatable(Of StandardFormat)
Inheritance
StandardFormatStandardFormatStandardFormatStandardFormat
Implements

Remarks

A StandardFormat object consists of a single character standard format specifier (such as 'G', 'D', or 'X') and an optional precision specifier. The precision specifier can range from 0 to 9, or it can be the special StandardFormat.NoPrecision value.

Constructors

StandardFormat(Char, Byte) StandardFormat(Char, Byte) StandardFormat(Char, Byte) StandardFormat(Char, Byte)

Initializes a new instance of the StandardFormat structure.

Fields

MaxPrecision MaxPrecision MaxPrecision MaxPrecision

Defines the maximum valid precision value.

NoPrecision NoPrecision NoPrecision NoPrecision

Indicates that a format doesn't use a precision or that the precision is unspecified.

Properties

HasPrecision HasPrecision HasPrecision HasPrecision

Gets a value that indicates whether a format has a defined precision.

IsDefault IsDefault IsDefault IsDefault

Gets a value that indicates whether the current instance is a default format.

Precision Precision Precision Precision

Gets the precision component of the format.

Symbol Symbol Symbol Symbol

Gets the character component of the format.

Methods

Equals(StandardFormat) Equals(StandardFormat) Equals(StandardFormat) Equals(StandardFormat)

Returns a value that indicates whether the specified StandardFormat is equal to the current instance.

Equals(Object) Equals(Object) Equals(Object) Equals(Object)

Returns a value that indicates whether the specified object is a StandardFormat object that is equal to the current instance.

GetHashCode() GetHashCode() GetHashCode() GetHashCode()

Returns the hash code for this instance.

Parse(ReadOnlySpan<Char>) Parse(ReadOnlySpan<Char>) Parse(ReadOnlySpan<Char>) Parse(ReadOnlySpan<Char>)

Converts a ReadOnlySpan<System.Char> into a StandardFormat instance using NoPrecision precision.

Parse(String) Parse(String) Parse(String) Parse(String)

Converts a classic .NET standard format string to a StandardFormat instance.

ToString() ToString() ToString() ToString()

Returns the string representation of this format.

TryParse(ReadOnlySpan<Char>, StandardFormat) TryParse(ReadOnlySpan<Char>, StandardFormat) TryParse(ReadOnlySpan<Char>, StandardFormat) TryParse(ReadOnlySpan<Char>, StandardFormat)

Attempts to convert a ReadOnlySpan<Char> to a StandardFormat instance and returns a value that indicates whether the parsing operation succeeded.

Operators

Equality(StandardFormat, StandardFormat) Equality(StandardFormat, StandardFormat) Equality(StandardFormat, StandardFormat) Equality(StandardFormat, StandardFormat)

Returns a value that indicates whether two StandardFormat instances are equal.

Implicit(Char to StandardFormat) Implicit(Char to StandardFormat) Implicit(Char to StandardFormat) Implicit(Char to StandardFormat)

Converts a character to a StandardFormat instance using NoPrecision precision.

Inequality(StandardFormat, StandardFormat) Inequality(StandardFormat, StandardFormat) Inequality(StandardFormat, StandardFormat) Inequality(StandardFormat, StandardFormat)

Determines whether two StandardFormat instances are unequal.

Applies to