Click or drag to resize
StringExtensionsToIPEndPoint Method
A string extension method that parses an ip:port pair to IPEndpoint. The method handles both IPv4 and IPv6.

Namespace: StreamCoders.Helpers
Assembly: MediaBase (in MediaBase.dll) Version: 2.0.5.0 (2.0.5.0)
Syntax
public static IPEndPoint ToIPEndPoint(
	this string endPoint
)

Parameters

endPoint
Type: SystemString
The endpoint to parse. This can be either IPv4 or IPv6.

Return Value

Type: IPEndPoint
An IPEndPoint instance.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type String. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
Exceptions
ExceptionCondition
FormatException Thrown when the format of the parameter is incorrect.
See Also