共用方式為


Unbox Class

Unboxes an object that contains a value type into a specific, possibly different value type.

Inheritance Hierarchy

System.Object
  Microsoft.VisualStudio.PlatformUI.Unbox

Namespace:  Microsoft.VisualStudio.PlatformUI
Assembly:  Microsoft.VisualStudio.Shell.11.0 (in Microsoft.VisualStudio.Shell.11.0.dll)

Syntax

'宣告
Public NotInheritable Class Unbox
public static class Unbox

The Unbox type exposes the following members.

Methods

  Name Description
Public methodStatic member AsBoolean Unboxes the specified object into a Boolean object.
Public methodStatic member AsDouble Unboxes the specified object into a Double object.
Public methodStatic member AsInt16 Unboxes the specified object into an Int16 object.
Public methodStatic member AsInt32 Unboxes the specified object into an Int32 object.
Public methodStatic member AsInt64 Unboxes the specified object into an Int64 object.
Public methodStatic member AsInt8 Unboxes the specified object into an Int8 object.
Public methodStatic member AsIntPtr Unboxes the specified object into an IntPtr object.
Public methodStatic member AsUInt16 Unboxes the specified object into a UInt16 object.
Public methodStatic member AsUInt32 Unboxes the specified object into a Uint32 object.
Public methodStatic member AsUInt64 Unboxes the specified object into a Uint64 object.
Public methodStatic member AsUInt8 Unboxes the specified object into a UInt8 object.

Top

Remarks

警告

Value truncation may occur when used this method, because the original source value is cast to the target value without ensuring that the target value can contain the original source value.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Reference

Microsoft.VisualStudio.PlatformUI Namespace