Advertisement
Fhernd

ComparacionSemantica.cs

Nov 30th, 2015
17,111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.79 KB | None | 0 0
  1. using System;
  2.  
  3. namespace Articulos.Cap06
  4. {
  5.     public class ComparacionSemantica
  6.     {
  7.         public static void Main()
  8.         {
  9.             Console.WriteLine ("¿Iguales {0} y {1}?: {2}", "EINSTEIN", "Einstein",
  10.                         String.Equals("Einstein", "EINSTEIN", StringComparison.OrdinalIgnoreCase));        // True
  11.                        
  12.             Console.WriteLine ("\n¿Iguales {0} y {1}?: {2}", '\u1E7A'.ToString(), '\u01D5'.ToString(),
  13.                         '\u1E7A'.ToString() == '\u01D5'.ToString());
  14.                        
  15.             Console.WriteLine ("\n¿Iguales {0} y {1}?: {2}", '\u1E7A'.ToString(), '\u01D5'.ToString(),
  16.                         String.Equals('\u1E7A'.ToString(), '\u01D5'.ToString(), StringComparison.CurrentCulture));
  17.         }
  18.     }
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement