Advertisement
Guest User

Untitled

a guest
Feb 19th, 2017
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.66 KB | None | 0 0
  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.  
  10. using System.Diagnostics;
  11. using System.IO;
  12.  
  13.  
  14. namespace WindowsFormsApplication5
  15. {
  16.     public partial class Form1 : Form
  17.     {
  18.         public Form1()
  19.         {
  20.             InitializeComponent();
  21.         }
  22.  
  23.          
  24.         private void button1_Click(object sender, EventArgs e)
  25.         {
  26.          
  27.             string dir = new FileInfo(Process.GetCurrentProcess().MainModule.FileName).Directory.FullName;
  28.             MessageBox.Show(dir);
  29.  
  30.         }
  31.     }
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement