+ 1

How to exeit to the loop ????

int pay = Convert.ToInt32(Console.ReadLine()); Payment pay1 = new Payment(); pay1.PaymentValue = pay; } } class Payment { private int paymentValue; //Š·Š°Š²ŠµŃ€ŃˆŠøтŠµ сŠ²Š¾Š¹ŃŃ‚Š²Š¾ public int PaymentValue { get {return PaymentValue;} set { if (value < 50000) Console.WriteLine("Assepted"); else Console.WriteLine("Error"); PaymentValue = value;

30th Oct 2020, 3:23 PM
Š”Š°Š½ŠøŠøŠ»
Š”Š°Š½ŠøŠøŠ» - avatar
2 Answers
+ 1
Where is the loop ? The code look valid. Just one } missing at the end of the set-method in the get method you need to use the private variable with lowercase letters. The same in the set method. Also notice that although you write an error. You are still assigning the value in the set method
30th Oct 2020, 9:12 PM
sneeze
sneeze - avatar
0
Please, help me)))
30th Oct 2020, 3:50 PM
Š”Š°Š½ŠøŠøŠ»
Š”Š°Š½ŠøŠøŠ» - avatar