Set of exceptions that can be thrown.

Classes

  ClassDescription
Public classDapforException
Base exception
Public classFieldDeclarationException
This exception is raised when two or more fields in a user-defined class have the same identifiers

Remarks

Following example demonstrates a case when two fields in a user-defined class have identical identifiers.
 Copy imageCopy
//Class with identical field identifiers
public class Product
{
    private string name;
    private string description;

    public string Name
    {
        get { return name; }
        set { name = value; }
    }

    //Modify default field identifier
    [Field("Name")]
    public string Description
    {
        get { return description; }
        set { description = value; }
    }
}

void PopulateGrid(Grid grid)
{
    //Initialize the grid
    grid.Headers.Add(new Header());
    grid.Headers[0].Add(new Column("Name"));
    grid.Headers[0].Add(new Column("Description"));

    //The grid throws FieldDeclarationException because Product has two identical fields
    grid.Rows.Add(new Product());
}