Windows Form Application의 path를 구하는 방법은 간단하다. Application.ExecutablePath 를 사용하면 된다. 아래는 사용 예제이다. using System; using System.Windows.Forms; namespace WindowsFormsApplication1 { public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void button1_Click(object sender, EventArgs e) { this.textBox1.Text = Application.ExecutablePath; } } }
아래는 실행중인 어플리케이션의 현재 위치를 구하는 간단한 예제이다. 이 예제는 System.Reflection 을 사용했다. Assembly.GetExecutingAssembly() 은 현재의 Assembly를 반환한다. Location Property는 Assembly의 위치를 반환한다. using System; using System.Reflection; namespace Test { class Program { static void Main(string[] args) { string myPath = Assembly.GetExecutingAssembly().Location; Console.WriteLine(myPath); Console.Read(); } } }
BinaryFormatter.Serialize 와 BinaryFormatter.Deserialize 를 사용한 예제입니다. 아래 예제를 보면 [Serializable] Attribute를 사용한 Name 클래스만 Serialize & Deserialize 한 것을 알 수 있습니다. 이 예제는 사실 BinaryFormatter.Serialize & BinaryFormatter.Deserialize 의 버그 여부를 조사하기 위해서 만들었습니다. Serialize 후 일부 데이터를 변경하고, 다시 Deserialize 했을 때, 혹시 버그가 있나 검사해봤는데, 정상이었습니다. BinaryFormatter.Serialize & BinaryFormatter.Deserialize 는 generic static me..
- Total
- Today
- Yesterday
- AdSense숨기기
- Automation
- .net framework
- java
- READYSTATE_COMPLETE
- iTextSharp
- ScreenHunter
- Rollback Rx
- DotNetMagic
- AxWebBrowser
- windows
- WinAutomation
- tagREADYSTATE
- iText
- 애드센스숨기기
- Regular Expressions
- c#
- 유틸리티
- Service pack
- download.com
- 애드센스감추기
- autohotkey
- registry
- 스크린캡쳐
- jre
- Sample Code
- Phalanger
- AdSense감추기
- Microsoft
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | |||||
3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 | 11 | 12 | 13 | 14 | 15 | 16 |
17 | 18 | 19 | 20 | 21 | 22 | 23 |
24 | 25 | 26 | 27 | 28 | 29 | 30 |
31 |