Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

c# properties making string required

using System.ComponentModel.DataAnnotations;

{
  [Required(ErrorMessage = "DocumentType is required.")]
  public string DocumentType 
  { 
      get { return _documentType; }
      set { _documentType = value; }
  }
}
 
PREVIOUS NEXT
Tagged: #properties #making #string #required
ADD COMMENT
Topic
Name
5+3 =