Complex.TryFormat 메서드
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
오버로드
TryFormat(Span<Char>, Int32, ReadOnlySpan<Char>, IFormatProvider) |
현재 인스턴스의 값을 제공된 문자 범위로 서식을 지정하려고 시도합니다. |
TryFormat(Span<Byte>, Int32, ReadOnlySpan<Char>, IFormatProvider) |
TryFormat(Span<Char>, Int32, ReadOnlySpan<Char>, IFormatProvider)
- Source:
- Complex.cs
- Source:
- Complex.cs
- Source:
- Complex.cs
현재 인스턴스의 값을 제공된 문자 범위로 서식을 지정하려고 시도합니다.
public:
virtual bool TryFormat(Span<char> destination, [Runtime::InteropServices::Out] int % charsWritten, ReadOnlySpan<char> format, IFormatProvider ^ provider);
public bool TryFormat(Span<char> destination, out int charsWritten, ReadOnlySpan<char> format = default, IFormatProvider? provider = default);
public bool TryFormat(Span<char> destination, out int charsWritten, ReadOnlySpan<char> format, IFormatProvider? provider);
abstract member TryFormat : Span<char> * int * ReadOnlySpan<char> * IFormatProvider -> bool
override this.TryFormat : Span<char> * int * ReadOnlySpan<char> * IFormatProvider -> bool
Public Function TryFormat (destination As Span(Of Char), ByRef charsWritten As Integer, Optional format As ReadOnlySpan(Of Char) = Nothing, Optional provider As IFormatProvider = Nothing) As Boolean
Public Function TryFormat (destination As Span(Of Char), ByRef charsWritten As Integer, format As ReadOnlySpan(Of Char), provider As IFormatProvider) As Boolean
매개 변수
- charsWritten
- Int32
이 메서드가 반환되면 destination
작성된 문자 수를 포함합니다.
- format
- ReadOnlySpan<Char>
destination
허용되는 형식을 정의하는 표준 또는 사용자 지정 형식 문자열을 나타내는 문자를 포함하는 범위입니다.
- provider
- IFormatProvider
destination
문화권별 서식 정보를 제공하는 선택적 개체입니다.
반환
서식이 성공했는지 true
. 그렇지 않으면 false
.
구현
설명
이 인터페이스의 구현은 동일한 형식의 ToString(String, IFormatProvider) 구현과 동일한 문자 문자열을 생성해야 합니다.
TryFormat
대상 버퍼에 공간이 부족한 경우에만 false
반환해야 합니다. 다른 모든 오류는 예외를 throw해야 합니다.
적용 대상
TryFormat(Span<Byte>, Int32, ReadOnlySpan<Char>, IFormatProvider)
- Source:
- Complex.cs
- Source:
- Complex.cs
public bool TryFormat(Span<byte> utf8Destination, out int bytesWritten, ReadOnlySpan<char> format = default, IFormatProvider? provider = default);
abstract member TryFormat : Span<byte> * int * ReadOnlySpan<char> * IFormatProvider -> bool
override this.TryFormat : Span<byte> * int * ReadOnlySpan<char> * IFormatProvider -> bool
Public Function TryFormat (utf8Destination As Span(Of Byte), ByRef bytesWritten As Integer, Optional format As ReadOnlySpan(Of Char) = Nothing, Optional provider As IFormatProvider = Nothing) As Boolean
매개 변수
- bytesWritten
- Int32
- format
- ReadOnlySpan<Char>
- provider
- IFormatProvider
반환
구현
적용 대상
GitHub에서 Microsoft와 공동 작업
이 콘텐츠의 원본은 GitHub에서 찾을 수 있으며, 여기서 문제와 끌어오기 요청을 만들고 검토할 수도 있습니다. 자세한 내용은 참여자 가이드를 참조하세요.
.NET