ModelComponentCollection.GetItem 方法

Gets a reference to the specified component.

命名空間:  Microsoft.AnalysisServices
組件:  Microsoft.AnalysisServices (在 Microsoft.AnalysisServices.dll 中)

語法

C#
protected IModelComponent GetItem(
    string key,
    bool throwIfNotFound,
    string keyPropertyName
)

參數

  • keyPropertyName
    型別:System.String
    The name of the IModelComponent property that provides key values.

傳回值

型別:Microsoft.AnalysisServices.IModelComponent
The IModelComponent that has the specified key.

例外狀況

例外狀況 條件
ItemNotFoundException

throwIfNotFound is set to false and one of the following conditions occurs:

key contains a null reference (Nothing in Visual Basic.)

-or-

key cannot be found in the ModelComponentCollection.

請參閱

參考

ModelComponentCollection 類別

Microsoft.AnalysisServices 命名空間