Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. // OrtizOL - xCSw - http://ortizol.blogspot.com
  2.  
  3. using System;
  4.  
  5. public class Email
  6. {
  7.     [ObsoleteAttribute]
  8.     public bool ComprobarEmail()
  9.     {
  10.          // Implementacion versión 1.
  11.          return false;
  12.     }
  13.  
  14.     public bool ValidarEmail()
  15.     {
  16.          // Implementación versiones 2, y 3.
  17.          return false;
  18.     }
  19. }
  20.  
  21. public class EmailTest
  22. {
  23.     public static void Main()
  24.     {
  25.         Console.WriteLine(Environment.NewLine);
  26.        
  27.         Email email = new Email();
  28.        
  29.         email.ComprobarEmail();        // Se genera advertencia en tiempo de compilación: CS0612
  30.         email.ValidarEmail();        // No genera ninguna advertencia o error en tiempo de compilación.
  31.        
  32.         Console.WriteLine(Environment.NewLine);
  33.     }
  34. }