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:
Verified
Q42: Which method is used to cause the
Q43: The StreamReader class extends the _ class.
A)
Q44: StreamReader inFile = new StreamReader("name.txt");
While ((inValue =
Q45: BinaryReader and BinaryWriter classes _.
A) expose only
Q46: Parent and Root are two key properties
Q48: When writing text files, if you add
Q49: The gray section below the Form object
Q50: The keyword _ can be used to
Q51: The FileDialog class has a property called
Q52: The StreamWriter method(s) that clears all buffers
Unlock this Answer For Free Now!
View this answer and more for free by performing one of the following actions
Scan the QR code to install the App and get 2 free unlocks
Unlock quizzes for free by uploading documents