Solved

Look at the Following Code Sample: Struct Pet

Question 1

Multiple Choice

Look at the following code sample: struct Pet
{
Public string name;
Public int age;
Public string type;
}
List<Pet> birdList = new List<Pet>() ;
Pet parrot = new Pet() ;
Which one of the following statements adds the Pet structure named parrot to the List object named birdList?


A) birdList.Add(parrot) ;
B) Add(birdList.parrot) ;
C) birdList[parrot];
D) birdList[0] = parrot;

Correct Answer:

verifed

Verified

Related Questions