Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

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;
  }
}
Comment

PREVIOUS NEXT
Code Example
Csharp :: esc exit winform 
Csharp :: retrive the last record dynamics 365 by c# 
Csharp :: linq query languages 
Csharp :: pun 2 matchmaking custom room properties 
Csharp :: c# replace characters in string that are invalid using regex 
Csharp :: lamda expression multiple and 
Csharp :: how to use span c# 
Csharp :: add file to combobox c# 
Csharp :: c# asqueryable select 
Csharp :: lsbCat.Items.Clear();lsbCat.Items.AddRange(Cats.ToArray());txtCat.Clear(); 
Csharp :: DefaultContractResolver .net exclude null values JsonSerializerSettings ContractResolver DefaultContractResolver 
Csharp :: delete an object c# 
Csharp :: c# lambda get all records async 
Csharp :: split a datatable based on number of rows 
Csharp :: Connect To MongoDB From A Different Machine 
Csharp :: unity slider decimal 0.01 
Csharp :: Here we create a MigraDoc Document object to draw the content of this page 
Csharp :: ExpandoObject Syntax that Compile 
Csharp :: save form in asp.net mvc 
Csharp :: internet connection sharing 
Csharp :: create circumference with nettopologysuite 
Csharp :: windows forms webbrowser goback 
Csharp :: how to pass id to modal in asp.net mvc 
Csharp :: filter collection viewbag 
Csharp :: how to create advance search with parameter in asp.net mvc 
Csharp :: 2d movement unity 
Csharp :: init stirng list c# 
Csharp :: percentage random c# 
Csharp :: c# windows form BalloonTipIcon close 
Csharp :: unity remove component 
ADD CONTENT
Topic
Content
Source link
Name
1+1 =