Use LEFT and RIGHT arrow keys to navigate between flashcards;
Use UP and DOWN arrow keys to flip the card;
H to show hint;
A reads text to speech;
9 Cards in this Set
- Front
- Back
Q:
How to verify that a drive exists? |
DriveInfo di = new DrifeInfo(@"c:\\);
if (di.DriveType == DriveType.Fixed){ ... } |
|
How to change the extension of a file?
|
1. Use the Path class
Path.ChangeExtension() 2. Move the file as the ChangeExtension class doesn't change the extension alone |
|
What are the 4 FileSystemWatcher events?
|
1. Changed
2. Deleted 3. Renamed 4. Created |
|
List 5 Stream classes
|
1. FileStream
2. MemoryStream 3. NetworkStream 4. GZipStream 5. CryptoStream |
|
What is the benefit that every Stream class derive from the same base class?
|
Every stream can be handled the same
|
|
What is the difference between a FileStream and a StreamReader?
|
StreamReader is designed for character input in a particular encoding, whereas the Stream class is designed for byte input and output. Use StreamReader for reading lines of information from a standard text file.
|
|
Waht are the base classes for StreamReader and StreamWriter?
|
TextReader and TextWriter
|
|
What is the purpose of a BufferedStream?
HowTo: use a BufferedStream to write to a textfile |
Use the BufferedStream when writing isn't peforming well.
1. Create a FileStream object for the text file 2. Create an instance of the Buffered Stream by passing the FileStream object 3. Create a StreamWriter by passing the created BufferedStream object 4. Write with the StreamWriter object 5. Close the StreamWriter object to write the changes to the underlying layers |
|
Name the 2 compression streams and what is the difference between the two?
|
DeflateStream and GZipStream
GZipStream has additional Header information and is compatible with available decompressors |