Category Archives: C#

c# 프로젝트 참조들이 느낌표로 표시

Overview : 원인과 해결 소스를 받고 소스를 열어 보면 위와 같이 참조가 모드 느낌표로 나온다. 원인 : dll 위치가 컴 마다 다르기 때문 해결 : 오류가 나더라도, 컴파일 하면 소스에서 가까운 위치에서 Dll 을 찾기 하여 하나씩 풀린다. – 풀리지 않는 DLL 은 프로그램을 닫고 다시 열면 찾아진다ㅏ. 마지막으로 찾지 못하는 DLL 은 수동으로 찾아준다.

Category: C#

ASMX 웹 서비스에서 파라미터 처리 방식

1. 모든 파라미터를 전송하지 않아도 에러가 발생하지 않도록 설정하는 방법 ✅ 방법 1: Nullable 타입 사용 파라미터를 nullable (int?, double?, DateTime?, string 등)로 설정하면, 클라이언트가 값을 보내지 않아도 에러 없이 처리됩니다. 위 예제에서: ✅ 방법 2: SOAP 헤더 또는 JSON 바인딩 활용 만약 REST API와 유사하게 일부 데이터만 선택적으로 보내고 싶다면, JSON을 활용하는 것이 좋습니다.… Read More »

Category: C#

Scintilla

Remark : Scintilla 오픈 소스 Net에서 사용하기 1.Nuget에서 패키지 다운로드 2.Net Demo 다운로드 3.Net Demo 실행화면

Category: C#

string.Format(“{0:s}.{0:fff}

Standard DateTime Formatting In DateTimeForma­tInfo there are defined standard patterns for the current culture. For example property ShortTimePattern is string that contains value h:mm tt for en-US culture and value HH:mm for de-DE culture. Following table shows patterns defined in DateTimeForma­tInfo and their values for en-US culture. First column contains format specifiers… Read More »

Category: C#

c# 연결 리스트 정렬하기

Category: C#

C# ToUniversalTime 으로 사용하기

추천 : ToUniversalTime

결과 참조 : https://stackoverflow.com/questions/1201378/how-does-datetime-touniversaltime-work

Category: C#

C# MySqlConnection

NuGet – MySqlConnector 설치 방법1. 포트연결은 : 아니고 , Insert 방법2. Asp.net Web.config Core 참조 : https://mysqlconnector.net/tutorials/connect-to-mysql/ Error : 원인 : MysqlBench 에서 나오는 쿼리에서 ‘(싱글쿼테이션)을 다 빼야지 된다. / C# 하고 java 의 문법적 차이

Category: C#

특수문자 제거

다음과 같은 작업이 편해짐 //sFileName = sFileName.Replace(” “, “”).Trim(); //sFileName = sFileName.Replace(@”\”, “”).Trim(); //sFileName = sFileName.Replace(“/”, “”).Trim(); //sFileName = sFileName.Replace(“:”, “”).Trim(); //sFileName = sFileName.Replace(“?”, “”).Trim(); ////sFileName = sFileName.Replace(“””, “”).Trim(); //sFileName = sFileName.Replace(““, “”).Trim(); //sFileName = sFileName.Replace(“|”, “”).Trim(); 결과

Category: C#

COM Interop

COM Interop은 닷넷 프레임워크(.NET Framework)에서 공통 언어 런타임(CLR)에 포함된 컴포넌트 오브젝트 모델(COM) 개체를 상호 운용할 수 있게 만드는 기술이다. COM Interop은 COM 컴포넌트의 수정 없이 액세스할 수 있는 기능을 제공하며, COM 타입의 개체를 .NET 타입의 개체에 대응하도록 시도한다. 그리고 COM Interop는 COM 개발자들이 COM 개체에 액세스하는 것만큼 쉽게 관리 개체에 액세스할 수 있도록 허용한다. 닷넷… Read More »

Category: C#