title: Loading a picture file Image.FromFile VS FileStream
body: <p>I must admit that I never understood what are the streams are all about- I always thought it's an internet thing. But now I run into a code that used a stream to load a file localy and I wonder if there is advantage for using a stream over... well the way I always loaded files:</p>
  
  <pre><code>private void loadingfromStream()
  {
     DirectoryInfo dirInfo = new DirectoryInfo("c:/");
     FileInfo[] fileInfoArr = dirInfo.GetFiles();
     FileInfo fileInfo = fileInfoArr[0];       
  
     // creating a bitmap from a stream
     FileStream fileStream = fileInfo.OpenRead();            
     Bitmap bitmap = new Bitmap(fileStream);  
     Image currentPicture = (Image)bitmap       
  }
  </code></pre>
  
  <p>vs.</p>
  
  <pre><code>private void loadingUsingImageClass
  {    
     Image currentPicture = Image.FromFile(originalPath);
  }
  </code></pre>