Solved

Look at the Following Code Sample: Struct Pet

Question 24

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

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions

Unlock this Answer For Free Now!

View this answer and more for free by performing one of the following actions

qr-code

Scan the QR code to install the App and get 2 free unlocks

upload documents

Unlock quizzes for free by uploading documents