Defferen logic result
There are two If cycles. When 'y' is equal to 52000. in the first case, the message is Accept, and in the second, an Error. And there must be a mistake everywhere. using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace SoloLearn { class Program { class Print{ private int x; public int Prins{ get{return x;} set { if (x<=50000) {x=value; Console.WriteLine ("Accept"); } else{ Console.WriteLine (" Error");} } } } static void Main(string[] args) { int y=52000; Print p=new Print (); p.Prins =y; int mark = y; if (mark <= 50000) { Console.WriteLine("accept"); } else { Console.WriteLine("error"); } } } }