Advertisement
Fhernd

NombreTipoAnonimoGenerado.cs

Apr 6th, 2015
15,084
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.56 KB | None | 0 0
  1. internal class NombreTipoAnonimoGenerado
  2. {
  3.     private string nombre;
  4.     private int edad;
  5.    
  6.     public NombreTipoAnonimoGenerado(string nombre, int edad)
  7.     {
  8.         this.nombre = nombre;
  9.         this.edad = edad;
  10.     }
  11.    
  12.     public string Nombre
  13.     {
  14.         get
  15.         {
  16.             return nombre;
  17.         }
  18.     }
  19.    
  20.     public int Edad
  21.     {
  22.         get
  23.         {
  24.             return edad;
  25.         }
  26.     }
  27.    
  28.     // Se sobreescriben los métodos `GetHashCode` y `Equals`.
  29.     // El método `ToString` también es sobreescrito.
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement