Share via


DataObject.Name property

Gets the name of the associated DataSourceObject object.

Namespace:  Microsoft.Office.Interop.InfoPath
Assembly:  Microsoft.Office.Interop.InfoPath (in Microsoft.Office.Interop.InfoPath.dll)

Syntax

'Declaration
ReadOnly Property Name As String
    Get
'Usage
Dim instance As DataObject
Dim value As String

value = instance.Name
string Name { get; }

Property value

Type: System.String

Remarks

The name of the DataObject object is the same as the name of the secondary data source that it represents. The name of the DataObject object can also be used as the argument to the Item property.

Examples

In the following example, the Name property of the DataSourceObject object is used to display the name of the DataObject object in a message box:

string strName = thisXDocument.DataObjects[0].Name;
thisXDocument.UI.Alert("Data Object name: " + strName);

See also

Reference

DataObject interface

DataObject members

Microsoft.Office.Interop.InfoPath namespace