+ 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 Antworten
+ 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