Exemple #1
0
 /// <summary>
 /// Retorna o texto equivalente do telefone
 /// </summary>
 /// <returns>String de texto equivalente</returns>
 public override string ToString()
 {
     return((DDI != null ? "+" + DDI.ToString() + " " : "")
            + (DDD != null ? "(" + DDD.ToString() + ") " : "")
            + Numero
            + (Ramal.IsNullOrEmpty() ? "" : "/" + Ramal));
 }
 public virtual bool ValidarDDD()
 {
     return(Regex.IsMatch(DDD.ToString(), @"\A[0-9]{2}\Z"));
 }