StandardFormat Struct
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.
Represents a standard format string without using an actual string.
public value class StandardFormat : IEquatable<System::Buffers::StandardFormat>
public readonly struct StandardFormat : IEquatable<System.Buffers.StandardFormat>
type StandardFormat = struct
Public Structure StandardFormat
Implements IEquatable(Of StandardFormat)
- Inheritance
- 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) |
Initializes a new instance of the StandardFormat structure. |
Fields
MaxPrecision |
Defines the maximum valid precision value. |
NoPrecision |
Indicates that a format doesn't use a precision or that the precision is unspecified. |
Properties
HasPrecision |
Gets a value that indicates whether a format has a defined precision. |
IsDefault |
Gets a value that indicates whether the current instance is a default format. |
Precision |
Gets the precision component of the format. |
Symbol |
Gets the character component of the format. |
Methods
Equals(Object) |
Returns a value that indicates whether the specified object is a StandardFormat object that is equal to the current instance. |
Equals(StandardFormat) |
Returns a value that indicates whether the specified StandardFormat is equal to the current instance. |
GetHashCode() |
Returns the hash code for this instance. |
Parse(ReadOnlySpan<Char>) |
Converts a |
Parse(String) |
Converts a classic .NET standard format string to a StandardFormat instance. |
ToString() |
Returns the string representation of this format. |
TryParse(ReadOnlySpan<Char>, StandardFormat) |
Attempts to convert a |
Operators
Equality(StandardFormat, StandardFormat) |
Returns a value that indicates whether two StandardFormat instances are equal. |
Implicit(Char to StandardFormat) |
Converts a character to a StandardFormat instance using NoPrecision precision. |
Inequality(StandardFormat, StandardFormat) |
Determines whether two StandardFormat instances are unequal. |
Applies to
.NET
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기