dotConnect for Salesforce Documentation
Devart.Data.Salesforce Namespace / SalesforceException Class / Code Property
Example

In This Topic
    Code Property
    In This Topic
    Gets a code that identifies the type of error.
    Syntax
    'Declaration
     
    Public ReadOnly Property Code As Integer
    public int Code {get;}

    Property Value

    A code that identifies the type of error.
    Example
    The following example displays the System.Exception.Message and Code properties of the exception.
    public void DisplaySalesforceErrorCollection(SalesforceException myException) {
      MessageBox.Show("Message: " + myException.Message + "\n" +
        "Code: " + myException.Code.ToString());
    }
    Public Sub DisplaySalesforceErrorCollection(myException As SalesforceException)
      MessageBox.Show("Message: " + myException.Message + ControlChars.Cr _
        + "Code: " + myException.Code.ToString())
    End Sub
    See Also