Hello! He began to study using the C # book for schoolchildren and immediately faced with difficulty. Namely, in the examples that are given in the book it is not clear why everything is underlined with a red line and does not work.
Suppose this example:
using System; class Animal { public string kindOfAnimal; public string name; public int numberOfLegs; public int height; public int length; public string color; bool hasTail; protected bool isMammal; private bool spellingCorrect; } class Zoo { public void GetAnimal() { Animal a = new Animal(); a.kindOfAnimal = "Kangaroo"; a.isMammal = false; a.spellingCorrect = true; } } Is that right? As I understand it, I now underline two lines:
a.isMammal = false; a.spellingCorrect = true; So how are they protected and private? So?
And here is a screenshot from the book. It is called C # for schoolchildren.

