IPEndPoint.Create(SocketAddress) Yöntem
Tanım
Önemli
Bazı bilgiler ürünün ön sürümüyle ilgilidir ve sürüm öncesinde önemli değişiklikler yapılmış olabilir. Burada verilen bilgilerle ilgili olarak Microsoft açık veya zımni hiçbir garanti vermez.
Yuva adresinden bir uç nokta oluşturur.
public:
override System::Net::EndPoint ^ Create(System::Net::SocketAddress ^ socketAddress);
public override System.Net.EndPoint Create(System.Net.SocketAddress socketAddress);
override this.Create : System.Net.SocketAddress -> System.Net.EndPoint
Public Overrides Function Create (socketAddress As SocketAddress) As EndPoint
Parametreler
- socketAddress
- SocketAddress
SocketAddress Uç nokta için kullanılacak.
Döndürülenler
EndPoint Belirtilen yuva adresini kullanan bir örnek.
Özel durumlar
'nin socketAddress AddressFamily değeri geçerli örneğin AddressFamily değerine eşit değildir.
-veya-
socketAddress. Boyut < 8.
Örnekler
Aşağıdaki örnekte, bir IPEndPointoluşturmak için belirtilen SocketAddress kullanılır.
// Recreate the connection endpoint from the serialized information.
IPEndPoint endpoint = new IPEndPoint(0,0);
IPEndPoint clonedIPEndPoint = (IPEndPoint) endpoint.Create(socketAddress);
Console.WriteLine("clonedIPEndPoint: " + clonedIPEndPoint.ToString());
' Recreate the connection endpoint from the serialized information.
Dim endpoint As New IPEndPoint(0, 0)
Dim clonedIPEndPoint As IPEndPoint = CType(endpoint.Create(socketAddress), IPEndPoint)
Console.WriteLine(("clonedIPEndPoint: " + clonedIPEndPoint.ToString()))