Partilhar via


Método Add (IModelComponent, String, ErrorPriority, Int32)

Creates and adds a ValidationError, with the specified IModelComponent value, error description, ErrorPriority value, and error code, to the end of the collection.

Namespace:  Microsoft.AnalysisServices
Assembly:  Microsoft.AnalysisServices (em Microsoft.AnalysisServices.dll)

Sintaxe

'Declaração
Public Function Add ( _
    source As IModelComponent, _
    error As String, _
    priority As ErrorPriority, _
    errorCode As Integer _
) As Integer
'Uso
Dim instance As ValidationErrorCollection
Dim source As IModelComponent
Dim error As String
Dim priority As ErrorPriority
Dim errorCode As Integer
Dim returnValue As Integer

returnValue = instance.Add(source, error, _
    priority, errorCode)
public int Add(
    IModelComponent source,
    string error,
    ErrorPriority priority,
    int errorCode
)
public:
int Add(
    IModelComponent^ source, 
    String^ error, 
    ErrorPriority priority, 
    int errorCode
)
member Add : 
        source:IModelComponent * 
        error:string * 
        priority:ErrorPriority * 
        errorCode:int -> int 
public function Add(
    source : IModelComponent, 
    error : String, 
    priority : ErrorPriority, 
    errorCode : int
) : int

Parâmetros

Valor de retorno

Tipo: System. . :: . .Int32
The zero-based index at which the ValidationError has been added.