Share via


CachedDataHostItemCollection.Add Method (String)

Adds the specified CachedDataHostItem to the end of the collection.

Namespace:  Microsoft.VisualStudio.Tools.Applications
Assembly:  Microsoft.VisualStudio.Tools.Applications.ServerDocument (in Microsoft.VisualStudio.Tools.Applications.ServerDocument.dll)

Syntax

'Declaration
Public Function Add ( _
    hostItemId As String _
) As CachedDataHostItem
public CachedDataHostItem Add(
    string hostItemId
)

Parameters

  • hostItemId
    Type: System.String
    The namespace and class in which the source data is cached.

Return Value

Type: Microsoft.VisualStudio.Tools.Applications.CachedDataHostItem
The CachedDataHostItem that was added to the end of the collection.

Exceptions

Exception Condition
InvalidOperationException

A CachedDataHostItem that corresponds to hostItemId already exists in the collection.

Remarks

The hostItemId parameter is a string that specifies the namespace and the class in the solution document that contains the cached data. The namespace and class name are separated by a period (.), for example, "ExcelWorkbook1.ThisWorkbook".

To add a CachedDataHostItem to the collection at a specific index location, use the Insert method.

.NET Framework Security

See Also

Reference

CachedDataHostItemCollection Class

Add Overload

Microsoft.VisualStudio.Tools.Applications Namespace