Conversions.ToUShort Method

Definition

Converts the specified object to a Ushort value.

Overloads

ToUShort(Object)

Converts an object to a Ushort value.

ToUShort(String)

Converts a string to a Ushort value.

ToUShort(Object)

Important

This API is not CLS-compliant.

CLS-compliant alternative
Microsoft.VisualBasic.CompilerServices.Conversions.ToShort(Object)

Converts an object to a Ushort value.

public:
 static System::UInt16 ToUShort(System::Object ^ Value);
[System.CLSCompliant(false)]
public static ushort ToUShort (object Value);
[System.CLSCompliant(false)]
public static ushort ToUShort (object? Value);
[<System.CLSCompliant(false)>]
static member ToUShort : obj -> uint16
Public Shared Function ToUShort (Value As Object) As UShort

Parameters

Value
Object

The object to convert.

Returns

The Ushort value of the object.

Attributes

Applies to

ToUShort(String)

Important

This API is not CLS-compliant.

CLS-compliant alternative
Microsoft.VisualBasic.CompilerServices.Conversions.ToShort(String)

Converts a string to a Ushort value.

public:
 static System::UInt16 ToUShort(System::String ^ Value);
[System.CLSCompliant(false)]
public static ushort ToUShort (string Value);
[System.CLSCompliant(false)]
public static ushort ToUShort (string? Value);
[<System.CLSCompliant(false)>]
static member ToUShort : string -> uint16
Public Shared Function ToUShort (Value As String) As UShort

Parameters

Value
String

The string to convert.

Returns

The Ushort value of the string.

Attributes

Applies to