using static System.Console;
public static void Main() {
var teste = new Teste(1, "abc");
var teste2 = new Teste();
var teste3 = new Teste(15) { a = 2, c = "xxx".ToCharArray() };
var teste4 = new Teste(1, "abc123456789012345678901234567890");
public Teste(int size = 30) {
throw new ArgumentException($"parâmetro deve ter tamanho máximo de 30");
public Teste(int a, char[] c) {
throw new ArgumentException($"parâmetro para {nameof(c)} deve ter tamanho máximo de 30");
public Teste(int a, string c) : this(a, c.ToCharArray()) {}