If I have a program where x = 2 and I subtracted x by 1, making x = 1. Is there any way to make it so that whenever x will be printed in the program, it will print 1?
using System;
namespace ConsoleApp1
{
class Program
{
static void Main(string[] args)
{
int x = 2;
Console.WriteLine(x-1);
Console.WriteLine(x); //make x's new value 1
}
}
}
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…