반응형

2021/10/01 3

[C#/Version] ClickOnce 또는 Assemply 현재 버전(Current Version) 확인

Version CurrentVersion { get { if (System.Deployment.Application.ApplicationDeployment.IsNetworkDeployed) { System.Deployment.Application.ApplicationDeployment ad = System.Deployment.Application.ApplicationDeployment.CurrentDeployment; return ad.CurrentVersion; } else { //string fileName = System.Reflection.Assembly.GetExecutingAssembly().Location; //Assembly.LoadFile(fileName).GetName().Version..

[C#/JSON] JSON 파일 쓰기/일기 (Write/Read) - using Newtonsoft.Json

using Newtonsoft.Json.Linq; //====== Json Write //====== void WriteJson(){ JObject jProp = new JObject { { "id", "user" }, { "name", "Pillar Park" }, }; jProp.Add("email", "userpark@userpark.net"); jProp.Add("country", "Korea (South)"); JObject jRoot = new JObject(new JProperty("Root", jAttr)); File.WriteAllText("test.json", jRoot.ToString()); } //====== Json Read //====== void ReadJson() { stri..

[C#/Event] TextBox 등 Control 객체의 키보드 이벤트 샘플(KeyPress, KeyDown)

/** // KeyDown : 컨트롤에 포커스가 있을 때 키를 누르면 발생합니다. // - https://docs.microsoft.com/ko-kr/dotnet/api/system.windows.forms.control.keydown?view=net-5.0 // KeyPress : 컨트롤에 포커스가 있을 때 문자, 스페이스 또는 백스페이스 키를 누르면 발생합니다. // - https://docs.microsoft.com/ko-kr/dotnet/api/system.windows.forms.control.keypress?view=net-5.0 // KeyUp : 컨트롤에 포커스가 있을 때 키를 눌렀다 놓으면 발생합니다. // - https://docs.microsoft.com/ko-kr/dotnet/api..

반응형