Byte.TryFormat(Span<Char>, Int32, ReadOnlySpan<Char>, IFormatProvider) Méthode
Définition
Tente de mettre en forme la valeur de l’instance d’entier non signé 8 bits actuelle dans la plage de caractères fournie.Tries to format the value of the current 8-bit unsigned integer instance into the provided span of characters.
public bool TryFormat (Span<char> destination, out int charsWritten, ReadOnlySpan<char> format = null, IFormatProvider provider = null);
member 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) = null, Optional provider As IFormatProvider = null) As Boolean
Paramètres
Quand cette méthode est retournée, la valeur de cette instance est mise en forme comme une plage de caractères.When this method returns, this instance's value formatted as a span of characters.
- charsWritten
- Int32
Quand cette méthode est retournée, nombre de caractères qui ont été écrits dans destination
.When this method returns, the number of characters that were written in destination
.
- format
- ReadOnlySpan<Char>
Plage contenant les caractères qui représentent une chaîne de format standard ou personnalisée qui définit le format acceptable pour destination
.A span containing the charactes that represent a standard or custom format string that defines the acceptable format for destination
.
- provider
- IFormatProvider
Objet facultatif qui fournit des informations de mise en forme propres à la culture pour destination
.An optional object that supplies culture-specific formatting information for destination
.
Retours
true
si la mise en forme a été effectuée, sinon, false
.true
if the formatting was successful; otherwise, false
.