Mega Code Archive

 
Categories / C# / Language Basics
 

Compare pointer

// compile with: /unsafe class CompareOperators {     unsafe static void Main()      {         int x = 234;         int y = 236;         int* p1 = &x;         int* p2 = &y;         System.Console.WriteLine(p1 < p2);         System.Console.WriteLine(p2 < p1);     } }