StandardFormat StandardFormat StandardFormat StandardFormat Struct

定義

代表不使用實際字串的標準格式字串。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)
繼承
StandardFormatStandardFormatStandardFormatStandardFormat
實作

備註

AStandardFormat物件組成的單一字元的標準格式規範 (例如 'G',將 ',或 'X') 和選擇性的有效位數規範。A StandardFormat object consists of a single character standard format specifier (such as 'G', 'D', or 'X') and an optional precision specifier. 有效位數規範的範圍可以從 0 到 9,或者它可以是特殊StandardFormat.NoPrecision值。The precision specifier can range from 0 to 9, or it can be the special StandardFormat.NoPrecision value.

建構函式

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

初始化 StandardFormat 結構的新執行個體。Initializes a new instance of the StandardFormat structure.

欄位

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.

屬性

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.

方法

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

傳回值,這個值指出指定的 StandardFormat 是否等於目前的執行個體。Returns a value that indicates whether the specified StandardFormat is equal to the current instance.

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

傳回值,這個值指出指定的物件是否為等於目前執行個體的 StandardFormat 物件。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>)

使用 NoPrecision 有效位數將 ReadOnlySpan<System.Char> 轉換為 StandardFormat 執行個體。Converts a ReadOnlySpan<System.Char> into a StandardFormat instance using NoPrecision precision.

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

將傳統 .NET 標準格式字串轉換為 StandardFormat 執行個體。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)

嘗試將 ReadOnlySpan<Char> 轉換為 StandardFormat 執行個體並傳回一個值,該值指出剖析作業是否成功。Attempts to convert a ReadOnlySpan<Char> to a StandardFormat instance and returns a value that indicates whether the parsing operation succeeded.

運算子

Equality(StandardFormat, StandardFormat) Equality(StandardFormat, StandardFormat) Equality(StandardFormat, StandardFormat) Equality(StandardFormat, 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)

使用 NoPrecision 有效位數將字元轉換為 StandardFormat 執行個體。Converts a character to a StandardFormat instance using NoPrecision precision.

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

判斷兩個 StandardFormat 執行個體是否不相等。Determines whether two StandardFormat instances are unequal.

適用於