Horje
ENUM error codes all Code Example
ENUM error codes all
public enum Error {
  DATABASE(0, "A database error has occurred."),
  DUPLICATE_USER(1, "This user already exists.");

  private final int code;
  private final String description;

  private Error(int code, String description) {
    this.code = code;
    this.description = description;
  }

  public String getDescription() {
     return description;
  }

  public int getCode() {
     return code;
  }

  @Override
  public String toString() {
    return code + ": " + description;
  }
}




Csharp

Related
C# Custom setter with parameter Code Example C# Custom setter with parameter Code Example
cannot override inherited member because it is not marked virtual abstract or override Code Example cannot override inherited member because it is not marked virtual abstract or override Code Example
convert word files to plain text c# Code Example convert word files to plain text c# Code Example
c# get serial ports Code Example c# get serial ports Code Example
unity disable the display of the camera frustrum Code Example unity disable the display of the camera frustrum Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
10