Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. using System;
  2.  
  3. namespace Articulos.Preguntas
  4. {
  5.     public struct Punto
  6.     {
  7.         public int x;
  8.         public int y;
  9.        
  10.         public Punto (int x, int y)
  11.         {
  12.             this.x = x;
  13.             this.y = y;
  14.         }
  15.     }
  16.    
  17.     public sealed class PuntoPrueba
  18.     {
  19.         public static void Main()
  20.         {
  21.             Punto a = new Punto (13, 13);
  22.             Punto b = a;
  23.            
  24.             a. x = 19;
  25.            
  26.             // ImpresiĆ³n de la ordenada 'x' de la variable `b`:
  27.             Console.WriteLine ( b.x);    // Salida: 13
  28.         }
  29.     }
  30. }