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