Vinit Patel

How to read multiple files using File.Open

Posted on: September 25, 2009


  1. String[] files = Directory.GetFiles(“folderpath”);
  2. for (int index = 0; index < files.Length; index++)
  3. {
  4. string path = files[index];
  5. Stream msgStream = File.Open(path, FileMode.Open, FileAccess.Read);
  6. OutlookStorage.Message msg = new OutlookStorage.Message(msgStream);
  7. msgStream.Close();
  8. showList(msg);
  9. msg.Dispose();
  10. }
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Calendar

September 2009
M T W T F S S
« Jul   Oct »
 123456
78910111213
14151617181920
21222324252627
282930  

Stats Of Blog

  • 6,824 hits

Cluster Map

%d bloggers like this: