using System;
class ImplicacionesArgumentosPorReferencia
{
static int x;
static void MetodoPrueba(out int y)
{
Console.WriteLine(x); // Valor de x es 0
y = 1; // y implícitamente hace que mute x
Console.WriteLine(x); // Ahora el valor de x es 1
}
static void Main()
{
MetodoPrueba(out x);
}
}
dXNpbmcgU3lzdGVtOwoKY2xhc3MgSW1wbGljYWNpb25lc0FyZ3VtZW50b3NQb3JSZWZlcmVuY2lhCnsKICAgIHN0YXRpYyBpbnQgeDsKCiAgICBzdGF0aWMgdm9pZCBNZXRvZG9QcnVlYmEob3V0IGludCB5KQogICAgewogICAgICAgIENvbnNvbGUuV3JpdGVMaW5lKHgpOyAgIC8vIFZhbG9yIGRlIHggZXMgMAogICAgICAgIHkgPSAxOyAgICAgICAgICAgICAgICAgIC8vIHkgaW1wbMOtY2l0YW1lbnRlIGhhY2UgcXVlIG11dGUgeAogICAgICAgIENvbnNvbGUuV3JpdGVMaW5lKHgpOyAgIC8vIEFob3JhIGVsIHZhbG9yIGRlIHggZXMgMQogICAgfQogICAgCiAgICBzdGF0aWMgdm9pZCBNYWluKCkKICAgIHsKICAgICAgICBNZXRvZG9QcnVlYmEob3V0IHgpOwogICAgfQp9