Study your flashcards anywhere!

Download the official Cram app for free >

  • Shuffle
    Toggle On
    Toggle Off
  • Alphabetize
    Toggle On
    Toggle Off
  • Front First
    Toggle On
    Toggle Off
  • Both Sides
    Toggle On
    Toggle Off
  • Read
    Toggle On
    Toggle Off

How to study your flashcards.

Right/Left arrow keys: Navigate between flashcards.right arrow keyleft arrow key

Up/Down arrow keys: Flip the card between the front and back.down keyup key

H key: Show hint (3rd side).h key

A key: Read text to speech.a key


Play button


Play button




Click to flip

9 Cards in this Set

  • Front
  • Back
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

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