logo

Crowdly

Considere o seguinte código: class Animal {      public string Nome { get;...

✅ The verified answer to this question is available below. Our community-reviewed solutions help you understand the material better.

Considere o seguinte código:

class Animal

{

     public string Nome { get; set; }

     public Animal(string nome)

     {

         Nome = nome;

      }

}

Animal animal1 = new Animal("Cão");

Animal animal2 = new Animal("Gato");

No código acima, animal1 e animal2 são objetos dependentes, ou seja, alterar a propriedade Nome de um deles afeta automaticamente o valor da propriedade Nome do outro.

17%
83%
More questions like this

Want instant access to all verified answers on moodle.escolatic.com.pt?

Get Unlimited Answers To Exam Questions - Install Crowdly Extension Now!