Utf8Formatter.TryFormat 메서드
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
오버로드
TryFormat(Boolean, Span<Byte>, Int32, StandardFormat)
- Source:
- Utf8Formatter.Boolean.cs
- Source:
- Utf8Formatter.Boolean.cs
- Source:
- Utf8Formatter.Boolean.cs
Boolean을 UTF8 문자열로 서식을 지정합니다.
public static bool TryFormat (bool value, Span<byte> destination, out int bytesWritten, System.Buffers.StandardFormat format = default);
static member TryFormat : bool * Span<byte> * int * System.Buffers.StandardFormat -> bool
Public Shared Function TryFormat (value As Boolean, destination As Span(Of Byte), ByRef bytesWritten As Integer, Optional format As StandardFormat = Nothing) As Boolean
매개 변수
- value
- Boolean
형식을 지정할 값입니다.
- bytesWritten
- Int32
메서드가 반환될 때 서식이 지정된 텍스트의 길이(바이트)를 포함합니다.
- format
- StandardFormat
사용할 표준 형식입니다.
반환
서식 지정 작업이 성공하면 true
이고, destination
가 너무 작으면 false
입니다.
설명
지원되는 형식:
형식 문자열 | 예제 결과 문자열 |
---|---|
G(기본값) | True/False |
l | true/false |
메서드가 실패하면 버퍼의 크기를 반복적으로 늘리고 성공할 때까지 다시 시도합니다.
적용 대상
TryFormat(Byte, Span<Byte>, Int32, StandardFormat)
- Source:
- Utf8Formatter.Integer.cs
- Source:
- Utf8Formatter.Integer.cs
- Source:
- Utf8Formatter.Integer.cs
Byte을 UTF8 문자열로 서식을 지정합니다.
public static bool TryFormat (byte value, Span<byte> destination, out int bytesWritten, System.Buffers.StandardFormat format = default);
static member TryFormat : byte * Span<byte> * int * System.Buffers.StandardFormat -> bool
Public Shared Function TryFormat (value As Byte, destination As Span(Of Byte), ByRef bytesWritten As Integer, Optional format As StandardFormat = Nothing) As Boolean
매개 변수
- value
- Byte
형식을 지정할 값입니다.
- bytesWritten
- Int32
메서드가 반환될 때 서식이 지정된 텍스트의 길이(바이트)를 포함합니다.
- format
- StandardFormat
사용할 표준 형식입니다.
반환
서식 지정 작업이 성공하면 true
이고, destination
가 너무 작으면 false
입니다.
설명
지원되는 형식:
형식 문자열 | 예제 결과 문자열 |
---|---|
G/g(기본값) | |
D/d | 122 |
N/n | 122 |
X/x | 7a |
메서드가 실패하면 버퍼의 크기를 반복적으로 늘리고 성공할 때까지 다시 시도합니다.
적용 대상
TryFormat(DateTime, Span<Byte>, Int32, StandardFormat)
- Source:
- Utf8Formatter.Date.cs
- Source:
- Utf8Formatter.Date.cs
- Source:
- Utf8Formatter.Date.cs
DateTime을 UTF8 문자열로 서식을 지정합니다.
public static bool TryFormat (DateTime value, Span<byte> destination, out int bytesWritten, System.Buffers.StandardFormat format = default);
static member TryFormat : DateTime * Span<byte> * int * System.Buffers.StandardFormat -> bool
Public Shared Function TryFormat (value As DateTime, destination As Span(Of Byte), ByRef bytesWritten As Integer, Optional format As StandardFormat = Nothing) As Boolean
매개 변수
- value
- DateTime
형식을 지정할 값입니다.
- bytesWritten
- Int32
메서드가 반환될 때 서식이 지정된 텍스트의 길이(바이트)를 포함합니다.
- format
- StandardFormat
사용할 표준 형식입니다.
반환
서식 지정 작업이 성공하면 true
이고, destination
가 너무 작으면 false
입니다.
설명
지원되는 형식:
형식 문자열 | 예제 결과 문자열 | 의견 |
---|---|---|
G(기본값) | 05/25/2017 10:30:15 | |
R | 2017년 1월 03일 화요일 08:08:05 GMT | (RFC 1123) |
l | tue, 03 jan 2017 08:08:05 gmt | (소문자 RFC 1123) |
O | 2017-06-12T12:30:45.768+00:00 | (왕복 가능) |
메서드가 실패하면 버퍼의 크기를 반복적으로 늘리고 성공할 때까지 다시 시도합니다.
적용 대상
TryFormat(DateTimeOffset, Span<Byte>, Int32, StandardFormat)
- Source:
- Utf8Formatter.Date.cs
- Source:
- Utf8Formatter.Date.cs
- Source:
- Utf8Formatter.Date.cs
DateTimeOffset을 UTF8 문자열로 서식을 지정합니다.
public static bool TryFormat (DateTimeOffset value, Span<byte> destination, out int bytesWritten, System.Buffers.StandardFormat format = default);
static member TryFormat : DateTimeOffset * Span<byte> * int * System.Buffers.StandardFormat -> bool
Public Shared Function TryFormat (value As DateTimeOffset, destination As Span(Of Byte), ByRef bytesWritten As Integer, Optional format As StandardFormat = Nothing) As Boolean
매개 변수
- value
- DateTimeOffset
형식을 지정할 값입니다.
- bytesWritten
- Int32
메서드가 반환될 때 서식이 지정된 텍스트의 길이(바이트)를 포함합니다.
- format
- StandardFormat
사용할 표준 형식입니다.
반환
서식 지정 작업이 성공하면 true
이고, destination
가 너무 작으면 false
입니다.
적용 대상
TryFormat(Decimal, Span<Byte>, Int32, StandardFormat)
- Source:
- Utf8Formatter.Decimal.cs
- Source:
- Utf8Formatter.Decimal.cs
- Source:
- Utf8Formatter.Decimal.cs
Decimal을 UTF8 문자열로 서식을 지정합니다.
public static bool TryFormat (decimal value, Span<byte> destination, out int bytesWritten, System.Buffers.StandardFormat format = default);
static member TryFormat : decimal * Span<byte> * int * System.Buffers.StandardFormat -> bool
Public Shared Function TryFormat (value As Decimal, destination As Span(Of Byte), ByRef bytesWritten As Integer, Optional format As StandardFormat = Nothing) As Boolean
매개 변수
- value
- Decimal
형식을 지정할 값입니다.
- bytesWritten
- Int32
메서드가 반환될 때 서식이 지정된 텍스트의 길이(바이트)를 포함합니다.
- format
- StandardFormat
사용할 표준 형식입니다.
반환
서식 지정 작업이 성공하면 true
이고, destination
가 너무 작으면 false
입니다.
설명
지원되는 형식:
형식 문자열 | 예제 결과 문자열 | 의견 |
---|---|---|
G/g(기본값) | ||
F/f | 12.45 | 고정 소수점 |
E/e | 1.245000e1 | 지수 |
메서드가 실패하면 버퍼의 크기를 반복적으로 늘리고 성공할 때까지 다시 시도합니다.
적용 대상
TryFormat(Double, Span<Byte>, Int32, StandardFormat)
- Source:
- Utf8Formatter.Float.cs
- Source:
- Utf8Formatter.Float.cs
- Source:
- Utf8Formatter.Float.cs
Double을 UTF8 문자열로 서식을 지정합니다.
public static bool TryFormat (double value, Span<byte> destination, out int bytesWritten, System.Buffers.StandardFormat format = default);
static member TryFormat : double * Span<byte> * int * System.Buffers.StandardFormat -> bool
Public Shared Function TryFormat (value As Double, destination As Span(Of Byte), ByRef bytesWritten As Integer, Optional format As StandardFormat = Nothing) As Boolean
매개 변수
- value
- Double
형식을 지정할 값입니다.
- bytesWritten
- Int32
메서드가 반환될 때 서식이 지정된 텍스트의 길이(바이트)를 포함합니다.
- format
- StandardFormat
사용할 표준 형식입니다.
반환
서식 지정 작업이 성공하면 true
이고, destination
가 너무 작으면 false
입니다.
설명
지원되는 형식:
형식 문자열 | 예제 결과 문자열 | 의견 |
---|---|---|
G/g(기본값) | ||
F/f | 12.45 | 고정 소수점 |
E/e | 1.245000e1 | 지수 |
메서드가 실패하면 버퍼의 크기를 반복적으로 늘리고 성공할 때까지 다시 시도합니다.
적용 대상
TryFormat(Guid, Span<Byte>, Int32, StandardFormat)
- Source:
- Utf8Formatter.Guid.cs
- Source:
- Utf8Formatter.Guid.cs
- Source:
- Utf8Formatter.Guid.cs
Guid을 UTF8 문자열로 서식을 지정합니다.
public static bool TryFormat (Guid value, Span<byte> destination, out int bytesWritten, System.Buffers.StandardFormat format = default);
static member TryFormat : Guid * Span<byte> * int * System.Buffers.StandardFormat -> bool
Public Shared Function TryFormat (value As Guid, destination As Span(Of Byte), ByRef bytesWritten As Integer, Optional format As StandardFormat = Nothing) As Boolean
매개 변수
- value
- Guid
형식을 지정할 값입니다.
- bytesWritten
- Int32
메서드가 반환될 때 서식이 지정된 텍스트의 길이(바이트)를 포함합니다.
- format
- StandardFormat
사용할 표준 형식입니다.
반환
서식 지정 작업이 성공하면 true
이고, destination
가 너무 작으면 false
입니다.
설명
지원되는 형식:
형식 문자열 | 결과 문자열 |
---|---|
D(기본값) | nnnnnnnn-nnnn-nnnn-nnnnn-nnnnnnn |
b | {nnnnnnnn-nnnn-nnnn-nnnn-nnnnnnnnnnnn} |
P | (nnnnnnnn-nnnn-nnnn-nnnnn-nnnnnn) |
N | nnnnnnnnnnnnnnnnn |
메서드가 실패하면 버퍼의 크기를 반복적으로 늘리고 성공할 때까지 다시 시도합니다.
적용 대상
TryFormat(Int16, Span<Byte>, Int32, StandardFormat)
- Source:
- Utf8Formatter.Integer.cs
- Source:
- Utf8Formatter.Integer.cs
- Source:
- Utf8Formatter.Integer.cs
Int16를 UTF8 문자열로 서식을 지정합니다.
public static bool TryFormat (short value, Span<byte> destination, out int bytesWritten, System.Buffers.StandardFormat format = default);
static member TryFormat : int16 * Span<byte> * int * System.Buffers.StandardFormat -> bool
Public Shared Function TryFormat (value As Short, destination As Span(Of Byte), ByRef bytesWritten As Integer, Optional format As StandardFormat = Nothing) As Boolean
매개 변수
- value
- Int16
형식을 지정할 값입니다.
- bytesWritten
- Int32
메서드가 반환될 때 서식이 지정된 텍스트의 길이(바이트)를 포함합니다.
- format
- StandardFormat
사용할 표준 형식입니다.
반환
서식 지정 작업이 성공하면 true
이고, destination
가 너무 작으면 false
입니다.
설명
지원되는 형식:
형식 문자열 | 예제 결과 문자열 |
---|---|
G/g(기본값) | |
D/d | 32767 |
N/n | 32,767 |
X/x | 7fff |
메서드가 실패하면 버퍼의 크기를 반복적으로 늘리고 성공할 때까지 다시 시도합니다.
적용 대상
TryFormat(Int32, Span<Byte>, Int32, StandardFormat)
- Source:
- Utf8Formatter.Integer.cs
- Source:
- Utf8Formatter.Integer.cs
- Source:
- Utf8Formatter.Integer.cs
Int32를 UTF8 문자열로 서식을 지정합니다.
public static bool TryFormat (int value, Span<byte> destination, out int bytesWritten, System.Buffers.StandardFormat format = default);
static member TryFormat : int * Span<byte> * int * System.Buffers.StandardFormat -> bool
Public Shared Function TryFormat (value As Integer, destination As Span(Of Byte), ByRef bytesWritten As Integer, Optional format As StandardFormat = Nothing) As Boolean
매개 변수
- value
- Int32
형식을 지정할 값입니다.
- bytesWritten
- Int32
메서드가 반환될 때 서식이 지정된 텍스트의 길이(바이트)를 포함합니다.
- format
- StandardFormat
사용할 표준 형식입니다.
반환
서식 지정 작업이 성공하면 true
이고, destination
가 너무 작으면 false
입니다.
설명
지원되는 형식:
형식 문자열 | 예제 결과 문자열 |
---|---|
G/g(기본값) | |
D/d | 32767 |
N/n | 32,767 |
X/x | 7fff |
메서드가 실패하면 버퍼의 크기를 반복적으로 늘리고 성공할 때까지 다시 시도합니다.
적용 대상
TryFormat(Int64, Span<Byte>, Int32, StandardFormat)
- Source:
- Utf8Formatter.Integer.cs
- Source:
- Utf8Formatter.Integer.cs
- Source:
- Utf8Formatter.Integer.cs
Int64를 UTF8 문자열로 서식을 지정합니다.
public static bool TryFormat (long value, Span<byte> destination, out int bytesWritten, System.Buffers.StandardFormat format = default);
static member TryFormat : int64 * Span<byte> * int * System.Buffers.StandardFormat -> bool
Public Shared Function TryFormat (value As Long, destination As Span(Of Byte), ByRef bytesWritten As Integer, Optional format As StandardFormat = Nothing) As Boolean
매개 변수
- value
- Int64
형식을 지정할 값입니다.
- bytesWritten
- Int32
메서드가 반환될 때 서식이 지정된 텍스트의 길이(바이트)를 포함합니다.
- format
- StandardFormat
사용할 표준 형식입니다.
반환
서식 지정 작업이 성공하면 true
이고, destination
가 너무 작으면 false
입니다.
설명
지원되는 형식:
형식 문자열 | 예제 결과 문자열 |
---|---|
G/g(기본값) | |
D/d | 32767 |
N/n | 32,767 |
X/x | 7fff |
메서드가 실패하면 버퍼의 크기를 반복적으로 늘리고 성공할 때까지 다시 시도합니다.
적용 대상
TryFormat(SByte, Span<Byte>, Int32, StandardFormat)
- Source:
- Utf8Formatter.Integer.cs
- Source:
- Utf8Formatter.Integer.cs
- Source:
- Utf8Formatter.Integer.cs
중요
이 API는 CLS 규격이 아닙니다.
SByte를 UTF8 문자열로 서식을 지정합니다.
[System.CLSCompliant(false)]
public static bool TryFormat (sbyte value, Span<byte> destination, out int bytesWritten, System.Buffers.StandardFormat format = default);
[<System.CLSCompliant(false)>]
static member TryFormat : sbyte * Span<byte> * int * System.Buffers.StandardFormat -> bool
Public Shared Function TryFormat (value As SByte, destination As Span(Of Byte), ByRef bytesWritten As Integer, Optional format As StandardFormat = Nothing) As Boolean
매개 변수
- value
- SByte
형식을 지정할 값입니다.
- bytesWritten
- Int32
메서드가 반환될 때 서식이 지정된 텍스트의 길이(바이트)를 포함합니다.
- format
- StandardFormat
사용할 표준 형식입니다.
반환
서식 지정 작업이 성공하면 true
이고, destination
가 너무 작으면 false
입니다.
- 특성
설명
지원되는 형식:
형식 문자열 | 예제 결과 문자열 |
---|---|
G/g(기본값) | |
D/d | 122 |
해당하지 않습니다. | 122 |
X/x | 7a |
메서드가 실패하면 버퍼의 크기를 반복적으로 늘리고 성공할 때까지 다시 시도합니다.
적용 대상
TryFormat(Single, Span<Byte>, Int32, StandardFormat)
- Source:
- Utf8Formatter.Float.cs
- Source:
- Utf8Formatter.Float.cs
- Source:
- Utf8Formatter.Float.cs
Single을 UTF8 문자열로 서식을 지정합니다.
public static bool TryFormat (float value, Span<byte> destination, out int bytesWritten, System.Buffers.StandardFormat format = default);
static member TryFormat : single * Span<byte> * int * System.Buffers.StandardFormat -> bool
Public Shared Function TryFormat (value As Single, destination As Span(Of Byte), ByRef bytesWritten As Integer, Optional format As StandardFormat = Nothing) As Boolean
매개 변수
- value
- Single
형식을 지정할 값입니다.
- bytesWritten
- Int32
메서드가 반환될 때 서식이 지정된 텍스트의 길이(바이트)를 포함합니다.
- format
- StandardFormat
사용할 표준 형식입니다.
반환
서식 지정 작업이 성공하면 true
이고, destination
가 너무 작으면 false
입니다.
설명
지원되는 형식:
형식 문자열 | 예제 결과 문자열 | 의견 |
---|---|---|
G/g(기본값) | ||
F/f | 12.45 | 고정 지점 |
E/e | 1.245000e1 | 지수 |
메서드가 실패하면 버퍼의 크기를 반복적으로 늘리고 성공할 때까지 다시 시도합니다.
적용 대상
TryFormat(TimeSpan, Span<Byte>, Int32, StandardFormat)
- Source:
- Utf8Formatter.TimeSpan.cs
- Source:
- Utf8Formatter.TimeSpan.cs
- Source:
- Utf8Formatter.TimeSpan.cs
TimeSpan을 UTF8 문자열로 서식을 지정합니다.
public static bool TryFormat (TimeSpan value, Span<byte> destination, out int bytesWritten, System.Buffers.StandardFormat format = default);
static member TryFormat : TimeSpan * Span<byte> * int * System.Buffers.StandardFormat -> bool
Public Shared Function TryFormat (value As TimeSpan, destination As Span(Of Byte), ByRef bytesWritten As Integer, Optional format As StandardFormat = Nothing) As Boolean
매개 변수
- value
- TimeSpan
형식을 지정할 값입니다.
- bytesWritten
- Int32
메서드가 반환될 때 서식이 지정된 텍스트의 길이(바이트)를 포함합니다.
- format
- StandardFormat
사용할 표준 형식입니다.
반환
서식 지정 작업이 성공하면 true
이고, destination
가 너무 작으면 false
입니다.
설명
지원되는 형식:
형식 문자열 | 결과 문자열 | 의견 | |
---|---|---|---|
c/t/T(기본값) | [-][d.]hh:mm:ss[.fffffff] | (상수 형식) | |
G | [-]d:hh:mm:ss.fffffff | (일반 long) | |
g | [-] [d:] [h]h:mm:ss[.f[f[f[f[f[f]]]]]] | (일반 약어) |
메서드가 실패하면 버퍼의 크기를 반복적으로 늘리고 성공할 때까지 다시 시도합니다.
적용 대상
TryFormat(UInt16, Span<Byte>, Int32, StandardFormat)
- Source:
- Utf8Formatter.Integer.cs
- Source:
- Utf8Formatter.Integer.cs
- Source:
- Utf8Formatter.Integer.cs
중요
이 API는 CLS 규격이 아닙니다.
UInt16을 UTF8 문자열로 서식을 지정합니다.
[System.CLSCompliant(false)]
public static bool TryFormat (ushort value, Span<byte> destination, out int bytesWritten, System.Buffers.StandardFormat format = default);
[<System.CLSCompliant(false)>]
static member TryFormat : uint16 * Span<byte> * int * System.Buffers.StandardFormat -> bool
Public Shared Function TryFormat (value As UShort, destination As Span(Of Byte), ByRef bytesWritten As Integer, Optional format As StandardFormat = Nothing) As Boolean
매개 변수
- value
- UInt16
형식을 지정할 값입니다.
- bytesWritten
- Int32
메서드가 반환될 때 서식이 지정된 텍스트의 길이(바이트)를 포함합니다.
- format
- StandardFormat
사용할 표준 형식입니다.
반환
서식 지정 작업이 성공하면 true
이고, destination
가 너무 작으면 false
입니다.
- 특성
설명
지원되는 형식:
형식 문자열 | 예제 결과 문자열 |
---|---|
G/g(기본값) | |
D/d | 32767 |
해당하지 않습니다. | 32,767 |
X/x | 7fff |
메서드가 실패하면 버퍼의 크기를 반복적으로 늘리고 성공할 때까지 다시 시도합니다.
적용 대상
TryFormat(UInt32, Span<Byte>, Int32, StandardFormat)
- Source:
- Utf8Formatter.Integer.cs
- Source:
- Utf8Formatter.Integer.cs
- Source:
- Utf8Formatter.Integer.cs
중요
이 API는 CLS 규격이 아닙니다.
UInt32을 UTF8 문자열로 서식을 지정합니다.
[System.CLSCompliant(false)]
public static bool TryFormat (uint value, Span<byte> destination, out int bytesWritten, System.Buffers.StandardFormat format = default);
[<System.CLSCompliant(false)>]
static member TryFormat : uint32 * Span<byte> * int * System.Buffers.StandardFormat -> bool
Public Shared Function TryFormat (value As UInteger, destination As Span(Of Byte), ByRef bytesWritten As Integer, Optional format As StandardFormat = Nothing) As Boolean
매개 변수
- value
- UInt32
형식을 지정할 값입니다.
- bytesWritten
- Int32
메서드가 반환될 때 서식이 지정된 텍스트의 길이(바이트)를 포함합니다.
- format
- StandardFormat
사용할 표준 형식입니다.
반환
서식 지정 작업이 성공하면 true
이고, destination
가 너무 작으면 false
입니다.
- 특성
설명
지원되는 형식:
형식 문자열 | 예제 결과 문자열 |
---|---|
G/g(기본값) | |
D/d | 32767 |
해당하지 않습니다. | 32,767 |
X/x | 7fff |
메서드가 실패하면 버퍼의 크기를 반복적으로 늘리고 성공할 때까지 다시 시도합니다.
적용 대상
TryFormat(UInt64, Span<Byte>, Int32, StandardFormat)
- Source:
- Utf8Formatter.Integer.cs
- Source:
- Utf8Formatter.Integer.cs
- Source:
- Utf8Formatter.Integer.cs
중요
이 API는 CLS 규격이 아닙니다.
UInt64을 UTF8 문자열로 서식을 지정합니다.
[System.CLSCompliant(false)]
public static bool TryFormat (ulong value, Span<byte> destination, out int bytesWritten, System.Buffers.StandardFormat format = default);
[<System.CLSCompliant(false)>]
static member TryFormat : uint64 * Span<byte> * int * System.Buffers.StandardFormat -> bool
Public Shared Function TryFormat (value As ULong, destination As Span(Of Byte), ByRef bytesWritten As Integer, Optional format As StandardFormat = Nothing) As Boolean
매개 변수
- value
- UInt64
형식을 지정할 값입니다.
- bytesWritten
- Int32
메서드가 반환될 때 서식이 지정된 텍스트의 길이(바이트)를 포함합니다.
- format
- StandardFormat
사용할 표준 형식입니다.
반환
서식 지정 작업이 성공하면 true
이고, destination
가 너무 작으면 false
입니다.
- 특성
설명
지원되는 형식:
형식 문자열 | 예제 결과 문자열 |
---|---|
G/g(기본값) | |
D/d | 32767 |
해당하지 않습니다. | 32,767 |
X/x | 7fff |
메서드가 실패하면 버퍼의 크기를 반복적으로 늘리고 성공할 때까지 다시 시도합니다.
적용 대상
.NET