Advertisement
DrAungWinHtut

frmFileIO.cs

Nov 5th, 2022
970
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.81 KB | None | 0 0
  1. using System.IO;
  2. namespace FileIO
  3. {
  4.     public partial class frmFileIO : Form
  5.     {
  6.         public frmFileIO()
  7.         {
  8.             InitializeComponent();
  9.         }
  10.  
  11.         private void button1_Click(object sender, EventArgs e)
  12.         {
  13.             string sFilePath = txtFilePath .Text;
  14.             if(File.Exists(sFilePath))
  15.             {
  16.                 MessageBox.Show ("ဖိုင်ရှိတယ်");
  17.             }
  18.             else
  19.             {
  20.                 MessageBox.Show("ဖိုင်မရှိပါ");
  21.             }
  22.         }
  23.  
  24.         private void btnRename_Click(object sender, EventArgs e)
  25.         {
  26.             string sFilePath = txtFilePath.Text;
  27.             string sNewFilePath = txtNewFilePath.Text;
  28.             File.Move(sFilePath, sNewFilePath);
  29.         }
  30.     }
  31. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement