Solved

Assume That an Object of the DirectoryInfo Is Instantiated Using

Question 47

Multiple Choice

Assume that an object of the DirectoryInfo is instantiated using the identifier dirListing. How could you retrieve the names of all files stored in dirListing that have a file extension of .cs?


A) foreach(FileInfo fil in dirListing.GetFiles("*.cs") )
B) foreach(FileInfo fil in dirListing.GetFiles("cs") )
C) foreach(DirectoryInfo dirListing in File.GetFiles("*.cs") )
D) foreach(DirectoryInfo dirListing in File.GetFiles("cs") )

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