IPAddress.TryWriteBytes(Span<Byte>, Int32) 方法

定义

尝试按网络顺序将当前 IP 地址写入字节范围。

public:
 bool TryWriteBytes(Span<System::Byte> destination, [Runtime::InteropServices::Out] int % bytesWritten);
public bool TryWriteBytes(Span<byte> destination, out int bytesWritten);
member this.TryWriteBytes : Span<byte> * int -> bool
Public Function TryWriteBytes (destination As Span(Of Byte), ByRef bytesWritten As Integer) As Boolean

参数

destination
Span<Byte>

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

bytesWritten
Int32

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

返回

true 如果 IP 地址已成功写入给定范围,则为否则,为 false.

适用于