NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

IDataObject.GetDataPresent (String, Boolean)

Determines whether data stored in this instance is associated with the specified format, using autoConvert to determine whether to convert the data to the format.

[Visual Basic]
Overloads Function GetDataPresent( _
   ByVal format As String, _
   ByVal autoConvert As Boolean _
) As Boolean
[C#]
bool GetDataPresent(
   string format,
   bool autoConvert
);
[C++]
bool GetDataPresent(
   String* format,
   bool autoConvert
) = 0;
[JScript]
function GetDataPresent(
   format : String,
   autoConvert : Boolean
) : Boolean;

Parameters

format
The format to check for. See DataFormats for predefined formats.
autoConvert
true to determine whether data stored in this instance can be converted to the specified format; false to check whether the data is in the specified format.

Return Value

true if the data is in, or can be converted to, the specified format; otherwise, false.

Remarks

Call this method to determine whether a format exists in this DataObject instance before calling GetData. Call GetFormats for the formats that are available in this instance.

This method returns true when:

This method returns false when:

Note   Data can be converted to another format if it was stored specifying that conversion is allowed, and if the requested format is compatable with the stored format. For example, data stored as Unicode can be converted to text.

For an implementation of this method, see GetDataPresent.

See Also

IDataObject Interface | IDataObject Members | System.WinForms Namespace | IDataObject.GetDataPresent Overload List | SetData | GetData | GetDataPresent | GetFormats