본문 바로가기
반응형

c#40

[개발] C# 프로그래머 참조 - 문서 주석에 대한 권장 태그 <value> C# 프로그래머 참조 property-description 다음은 각 문자에 대한 설명입니다. property-description 속성에 대한 설명입니다. 설명 태그를 사용하면 속성을 설명할 수 있습니다. Visual Studio .NET 개발 환경의 코드 마법사를 통해 속성을 추가하면 새 속성에 대한 태그도 추가됩니다. 그러면 사용자는 직접 태그를 추가하여 속성이 나타내는 값을 설명해야 합니다. /doc로 컴파일하여 문서 주석을 파일로 저장합니다. 예제// xml_value_tag.cs // compile with: /doc:xml_value_tag.xml using System; /// text for class Employee public class Employee { private string .. 2010. 10. 29.
[ASP.NET] Base64 인코드 디코드(C#) 출처 : http://www.hoonsbara.com/hoonsboard.aspx?table_name=asptip&board_idx=447451&page=4&keyword=&search=&boardmode=2 protected string Base64Encode(string str) { return Convert.ToBase64String( System.Text.Encoding.GetEncoding("euc-kr").GetBytes(str)); } protected string Base64Decode(string str) { return System.Text.Encoding.GetEncoding("euc-kr").GetString( System.Convert.FromBase64String(str)); }.. 2010. 9. 16.
[C#] 라이선스용 컴퓨터 유일키 생성 [C#] 라이선스용 컴퓨터 유일키 생성 Introduction For licensing purpose according to me the best way and secure way is to generate an unique key for client's machine and providing a corresponding license key for that key. For this purpose you can take help of the unique id of client's computer's motherboard, BIOS and processor's. When you get these IDs you can generate any key of your preferable format. Year a.. 2010. 9. 16.
c# delay 함수 / C# Delay function 방법 1. Environment.TickCount를 사용하는 방법 public void Delay(int ms) { int time = Environment.TickCount; do { if (Environment.TickCount - time >= ms) return; } while (true); } 방법 2. DateTime 관련 함수를 이용하는 방법 public static DateTime PauseForMilliSeconds( int MilliSecondsToPauseFor ) { System.DateTime ThisMoment = System.DateTime.Now; System.TimeSpan duration = new System.TimeSpan( 0, 0, 0, 0, MilliSeconds.. 2010. 9. 10.
[개발/.net] 닷넷 프레임워크 - 프로그래밍 방식으로 윈도우즈 서비스 작성 닷넷 프레임워크 - 프로그래밍 방식으로 윈도우즈 서비스 작성 C#.NET 기준 Windows 서비스 프로젝트 템플릿을 사용하지 않고 상속 및 다른 인프라 요소를 직접 설정하여 독자적인 서비스를 작성할 수도 있습니다. 서비스를 프로그래밍 방식으로 만들 경우 템플릿을 통해 처리할 수 있는 몇 가지 단계를 직접 수행해야 합니다. ServiceBase 클래스에서 상속하는 서비스 클래스를 설정해야 합니다. 서비스 프로젝트에 Main 메서드를 만들어 서비스가 Run 메서드를 실행하고 호출하도록 정의해야 합니다. OnStart 및 OnStop 프로시저를 재정의하고 프로시저에서 실행할 모든 코드를 입력해야 합니다. 참고 Visual Studio Standard Edition에서는 Windows 서비스 템플릿과 관련 기.. 2010. 8. 18.
[개발] .NET 프레임워크 클래스 라이브러리 - ServiceBase 클래스 서비스 응용 프로그램의 일부로 존재할 서비스에 기본 클래스를 제공합니다. ServiceBase는 새 서비스 클래스를 만들 때 파생되어야 합니다. 네임스페이스: System.ServiceProcess 어셈블리: System.ServiceProcess(system.serviceprocess.dll) 언어 : C# / C++ // C# language example C# public class ServiceBase : Component // C++ language example C++ public ref class ServiceBase : public Component 설명 서비스 응용 프로그램에 있는 서비스 클래스를 정의할 때 ServiceBase에서 파생됩니다. 임의의 유용한 서비스가 OnStart 및 O.. 2010. 8. 17.
반응형