public Conta(int id, int mes, double leitura_anterior, double leitura_atual, Titular pessoa) { this.id = id; this.mes = mes; this.leitura_anterior = leitura_anterior; this.leitura_atual = leitura_atual; this.pessoa = pessoa; }
public Agua(int id, int mes, double leitura_anterior, double leitura_atual, Titular pessoa) : base(id, mes, leitura_anterior, leitura_atual, pessoa) { this.id = id; this.mes = mes; this.leitura_anterior = leitura_anterior; this.leitura_atual = leitura_atual; this.pessoa = pessoa; }
public bool Equals(IDados d) { Titular aux = (Titular)d; if (aux.cpf == this.cpf) { return(true); } else { return(false); } }
public int CompareTo(IDados other) { Titular aux = (Titular)other; long cpfthis = Convert.ToInt64(this.cpf.Replace(".", "").Replace("-", "")); long cpfother = Convert.ToInt64(aux.cpf.Replace(".", "").Replace("-", "")); if (cpfthis > cpfother) { return(1); } else if (cpfthis == cpfother) { return(0); } else { return(-1); } }