Computers/Language 2013. 7. 16. 20:37



1.        Top 20 Programming tips for Performance Improvement (Java/C#) 
http://ashwini47-tts.blogspot.kr/2012/05/top-20-programming-tips-for-performance.html 
Setting up a C# application for max performance build 
http://stackoverflow.com/questions/6911863/setting-up-a-c-sharp-application-for-max-performance-build


http://www.c-sharpcorner.com/UploadFile/dacca2/5-tips-to-improve-performance-of-C-Sharp-code/

5 Tips to improve performance of C# code

In this article I show you 5 best practices of C# programming. I have learned these practices from my daily programming experience. I have tested all code in release mode and have taken screen shots after the stability of the development environment. And I think you will enjoy these tips. 


 중복실행 방지

C# Mutex

http://www.dotnetperls.com/mutex

--------------------------------------------- FORM 에서는 작동이 안됨 -- 
[C#]프로그램 중복 실행 방지(뮤텍스 사용 안함) 

http://seoddong.tistory.com/26

우리는 보통 프로그램 중복 실행을 방지한다고 표현하는데 외국에서는 중복 인스턴스 실행을 방지한다고 표현하나보다. 여기저기 뒤진 끝에 외국 소스를 찾았는데 싱글 인스턴스를 유지하는 방법이라고 써 있었다.

아래의 첨부파일의 확장자를 cs로 고친 후 프로그램에 적용시키면 된다. 

ProcessChecker.txt

그리고 소스의 앞부분 주석에 써 놓은 것처럼 C#프로그램의 진입점인 Program.cs 파일에 
[STAThread]
static void Main()
{
  if (ProcessChecker.IsOnlyProcess("Program Window Text"))
  {
      Application.EnableVisualStyles();
      Application.SetCompatibleTextRenderingDefault(false);
      Application.Run(new TextWindow());
  }
}
 


posted by 털보네i
: