This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
What does the Directory.GetFiles method in C# return?
Directory.GetFiles
It returns the size of the specified directory.
It returns the names of subdirectories within the specified directory.
It returns the names of files within the specified directory.
What is the purpose of the StreamReader and StreamWriter classes in C#?
StreamReader
StreamWriter
They're used to establish network connections for data transmission.
They're used to read and write binary data from and to a stream.
They're used to read characters from a byte stream and write characters to a stream in a specific encoding.
What is the purpose of the FileStream.Seek method in C#?
FileStream.Seek
It's used to write to a file.
It's used to change the current position of the FileStream object.
FileStream
It's used to close a file.
What are some common use cases for the BinaryReader and BinaryWriter classes in .NET?
BinaryReader
BinaryWriter
They're used for creating and managing databases.
They're used for handling binary data such as configuration and multimedia files.
They're used for reading and writing text files.
What classes are used to create and manage directories and files in a C# app?
BinaryWriter and BinaryReader classes.
Path, Directory, and File classes.
Path
Directory
File
StreamWriter, StreamReader, and FileStream classes.
You must answer all questions before checking your work.
Was this page helpful?
Need help with this topic?
Want to try using Ask Learn to clarify or guide you through this topic?