Solved

Assume That an Object of the DirectoryInfo Is Instantiated Using

Question 44

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