Condividi tramite


URL.DefaultPort Property

Definition

Gets the default port number of the protocol associated with this URL.

public int DefaultPort { [Android.Runtime.Register("getDefaultPort", "()I", "")] get; }
[<get: Android.Runtime.Register("getDefaultPort", "()I", "")>]
member this.DefaultPort : int

Property Value

the port number

Attributes

Remarks

Gets the default port number of the protocol associated with this URL. If the URL scheme or the URLStreamHandler for the URL do not define a default port number, then -1 is returned.

Added in 1.4.

Java documentation for java.net.URL.getDefaultPort().

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

See also