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)

Source:
Conversions.vb
Source:
Conversions.vb
Source:
Conversions.vb

Important

This API is not CLS-compliant.

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

Converts an object to a Ushort value.

C#
[System.CLSCompliant(false)]
public static ushort ToUShort(object Value);
C#
[System.CLSCompliant(false)]
public static ushort ToUShort(object? Value);

Parameters

Value
Object

The object to convert.

Returns

The Ushort value of the object.

Attributes

Applies to

.NET 10 ja muut versiot
Tuote Versiot
.NET Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Framework 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
UWP 10.0

ToUShort(String)

Source:
Conversions.vb
Source:
Conversions.vb
Source:
Conversions.vb

Important

This API is not CLS-compliant.

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

Converts a string to a Ushort value.

C#
[System.CLSCompliant(false)]
public static ushort ToUShort(string Value);
C#
[System.CLSCompliant(false)]
public static ushort ToUShort(string? Value);

Parameters

Value
String

The string to convert.

Returns

The Ushort value of the string.

Attributes

Applies to

.NET 10 ja muut versiot
Tuote Versiot
.NET Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Framework 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
UWP 10.0