Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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 FileIO1
- {
- public partial class frmFileIO1 : Form
- {
- public frmFileIO1()
- {
- InitializeComponent();
- }
- private void btnReadFile_Click(object sender, EventArgs e)
- {
- string sFname = txtFileName.Text; //sFname ကို User ထည့်ပေးတဲ့ txtFileName ကနေ ယူမယ်
- StreamReader sr = new StreamReader(sFname ); //file name ကို အရှင်ထည့်ဖို့ sFname ကို သုံး
- string sData = sr.ReadToEnd(); //q1 file ထဲက အကုန်ဖတ်လိုက်ပြီး sData ထဲ ထည့်လိုက်တာ
- txtData .Text = sData;
- sr.Close();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement