IPAddress.TryFormat(Span<Char>, Int32) 方法

定义

尝试将当前 IP 地址的格式设置为所提供的范围。

public:
 bool TryFormat(Span<char> destination, [Runtime::InteropServices::Out] int % charsWritten);
public bool TryFormat(Span<char> destination, out int charsWritten);
member this.TryFormat : Span<char> * int -> bool
Public Function TryFormat (destination As Span(Of Char), ByRef charsWritten As Integer) As Boolean

参数

destination
Span<Char>

此方法返回时,IP 地址作为字符范围。

charsWritten
Int32

此方法返回时,写入范围中的字符数。

返回

true 如果格式设置成功,则为否则,为 false.

适用于