Don't like ads? PRO users don't see any ads ;-)
Guest

scope

By: a guest on Aug 21st, 2012  |  syntax: None  |  size: 0.75 KB  |  hits: 18  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel;
  4. using System.Data;
  5. using System.Drawing;
  6. using System.Linq;
  7. using System.Text;
  8. using System.Windows.Forms;
  9. using System.IO;
  10.  
  11. namespace StreamReader
  12. {
  13.     public partial class Form1 : Form
  14.     {
  15.         public Form1()
  16.         {
  17.             InitializeComponent();
  18.         }
  19.  
  20.         private void button1_Click(object sender, EventArgs e)
  21.         {
  22.             OpenFileDialog ofd = new OpenFileDialog();
  23.             if (ofd.ShowDialog() == System.Windows.Forms.DialogResult.OK)
  24.             {
  25.                 //StreamReader sr = new StreamReader(
  26.                 StreamReader sr = new StreamReader(File.OpenRead(ofd.FileName));
  27.  
  28.             }
  29.         }
  30.     }
  31. }