C# “is inaccessible due to its protection level” error in constructor
问题 The constructor of the child class "caesar" gives an error. It says that name, type is inaccessible due to its protection level. How come? As this is a child class derived from "Cipher" class it shouldn't give an error like this. How can I overcome this situation. But I want those variables to be private. I don't want to change them as public. ***The second code example works. Can anybody see a difference? namespace Encrypter { class Cipher { public Cipher(string name, string type) { setName