- 1

There will be an error when you run the program below. What's the problem?

namespace ConsoleApplication1 { class A { protected int x = 123; } class B : A { static void Main() { A a = new A(); B b = new B(); a.x = 10; b.x = 10; } } }

16th Oct 2020, 5:38 AM
ź³µģ§€ģ‚¬ķ•­ģ˜ģƒģ°øź³ 
ź³µģ§€ģ‚¬ķ•­ģ˜ģƒģ°øź³  - avatar
2 Answers
+ 1
Don't write protected in firs of integer
16th Oct 2020, 6:09 AM
Martin Jefferson
Martin Jefferson - avatar
16th Oct 2020, 5:49 AM
Ipang