Condividi tramite


Variant.ToVariant Method

Converts the given variant object to a Variant class object.

Namespace:  Microsoft.VisualStudio.Package
Assemblies:   Microsoft.VisualStudio.Package.LanguageService (in Microsoft.VisualStudio.Package.LanguageService.dll)
  Microsoft.VisualStudio.Package.LanguageService.10.0 (in Microsoft.VisualStudio.Package.LanguageService.10.0.dll)
  Microsoft.VisualStudio.Package.LanguageService.9.0 (in Microsoft.VisualStudio.Package.LanguageService.9.0.dll)

Syntax

'Dichiarazione
Public Shared Function ToVariant ( _
    ptr As IntPtr _
) As Variant
'Utilizzo
Dim ptr As IntPtr
Dim returnValue As Variant

returnValue = Variant.ToVariant(ptr)
public static Variant ToVariant(
    IntPtr ptr
)
public:
static Variant ToVariant(
    IntPtr ptr
)
static member ToVariant : 
        ptr:IntPtr -> Variant 
public static function ToVariant(
    ptr : IntPtr
) : Variant

Parameters

Return Value

Type: Microsoft.VisualStudio.Package.Variant
If successful, returns a Variant object containing the value of the marshaled variant object; otherwise, returns an empty Variant object.

Remarks

This method is used by the HandlePreExec method on the ViewFilter class to convert the marshaled variant object to a language service-specified Variant object.

.NET Framework Security

See Also

Reference

Variant Structure

Variant Members

Microsoft.VisualStudio.Package Namespace