DomainException.ErrorCode Property
[WCF RIA Services Version 1 Service Pack 2 is compatible with either .NET framework 4 or .NET Framework 4.5, and with either Silverlight 4 or Silverlight 5.]
Gets or sets the custom error code for this exception.
Namespace: System.ServiceModel.DomainServices.Server
Assembly: System.ServiceModel.DomainServices.Server (in System.ServiceModel.DomainServices.Server.dll)
Syntax
'Declaration
Public Property ErrorCode As Integer
Get
Set
'Usage
Dim instance As DomainException
Dim value As Integer
value = instance.ErrorCode
instance.ErrorCode = value
public int ErrorCode { get; set; }
public:
property int ErrorCode {
int get ();
void set (int value);
}
member ErrorCode : int with get, set
function get ErrorCode () : int
function set ErrorCode (value : int)
Property Value
Type: System.Int32
The custom error code for this exception.
Remarks
The error code can have any user-defined value.
Examples
Private domainException As DomainException = New DomainException("Error Message", 326)
private DomainException domainException = new DomainException("Error Message", 0x00000326);