Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace Articulos.Preguntas
- {
- public struct Punto
- {
- public int x;
- public int y;
- public Punto (int x, int y)
- {
- this.x = x;
- this.y = y;
- }
- }
- public sealed class PuntoPrueba
- {
- public static void Main()
- {
- Punto a = new Punto (13, 13);
- Punto b = a;
- a. x = 19;
- // Impresión de la ordenada 'x' de la variable `b`:
- Console.WriteLine ( b.x); // Salida: 13
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement