using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; using System.IO;
namespace WindowsFormsApplication1 { public partial class Form1 : Form { public Form1() { InitializeComponent(); }
using System;
ReplyDeleteusing System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.IO;
namespace WindowsFormsApplication1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
Stream mystream;
OpenFileDialog openfiledialog1 = new OpenFileDialog();
if(openFileDialog1.ShowDialog()== System.Windows.Forms.DialogResult.OK)
{
if((mystream=openFileDialog1.OpenFile()) !=null)
{
string strfileName=openFileDialog1.FileName ;
string filetex=File.ReadAllText(strfileName);
richTextBox1.Text=filetex ;
}
}
}
}
}