Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Estabelecimento
- {
- public Estabelecimento(long cnpj, TipoCnpj tipoEstabelecimento)
- {
- Cnpj = cnpj;
- TipoEstabelecimento = tipoEstabelecimento;
- }
- public readonly long Cnpj;
- public readonly TipoCnpj TipoEstabelecimento;
- public override bool Equals(Object obj)
- {
- if (obj == null)
- {
- return false;
- }
- Estabelecimento outroEstabelecimento = (Estabelecimento)obj;
- if (outroEstabelecimento == null)
- {
- return false;
- }
- return (Cnpj == outroEstabelecimento.Cnpj && TipoEstabelecimento == outroEstabelecimento.TipoEstabelecimento);
- }
- public override int GetHashCode()
- {
- return Cnpj.GetHashCode();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement