Share via


COMVariant.ToString Method

Definition

Creates a string representation of a COMVariant object. This string representation includes the value and type of the object.

public:
 override System::String ^ ToString();
public override string ToString ();
override this.ToString : unit -> string
Public Overrides Function ToString () As String

Returns

The string representation of the COMVariant object.

Remarks

The actual string returned from this method depends on the variant data type of the COMVariant object.

The following example creates a COMVariant object and assigns the current date to it. It then prints a description of the object to the Infolog.

COMVariant theDay; 
theDay = COMVariant::createFromDate(today()); 
info(theDay.toString());

Applies to