C#/기초
-
[C#] gRPC ExceptionC#/기초 2025. 1. 14. 14:50
Status(StatusCode="Unknown", Detail="Exception was thrown by handler.") https://learn.microsoft.com/ko-kr/aspnet/core/grpc/error-handling?view=aspnetcore-9.0 .NET에서 gRPC를 사용한 오류 처리.NET에서 gRPC를 사용하여 오류 처리를 수행하는 방법을 알아봅니다.learn.microsoft.com Status(StatusCode="ResourceExhausted", Detail="Received message exceeds the maximum configured message size.") Server public void ConfigureServices..
-
[C#] List 중복 제거C#/기초 2024. 12. 18. 15:19
https://code-piggy.tistory.com/entry/C-%EC%A4%91%EB%B3%B5%EB%90%9C-%EA%B0%92-%EC%97%86%EC%95%A0%EA%B8%B0 C# - 중복된 값 제거하기1. Contains을 사용하기 foreach(int i in list) { if (answer.Contains(i)) continue; answer.Add(i); } 2. Distinct 메서드 사용하기 Distnict 메서드는 System.Linq 네임스페이스에 있으므로 using문에 System.Linq를 추가한다. using Scode-piggy.tistory.com
-
-
[C#] 서비스 프로그램 제어C#/기초 2024. 12. 2. 07:47
sc create 서비스이름(LSISDSM) binPath="실행파일경로" start=auto displayname="LSIS DSM Service" sc description 서비스이름(LSISDSM) "this is DSM Service" https://learn.microsoft.com/ko-kr/windows-server/administration/windows-commands/sc-config sc.exe 구성레지스트리 및 서비스 제어 관리자 데이터베이스에서 서비스 항목의 값을 수정하여 서비스 구성을 변경하는 sc.exe 구성 명령에 대한 참조 문서입니다.learn.microsoft.com https://learn.microsoft.com/en-us/dotnet/api/system.s..
-
[C#] ExceptionC#/기초 2024. 9. 25. 10:57
https://learn.microsoft.com/ko-kr/dotnet/standard/exceptions/how-to-explicitly-throw-exceptions 방법: 명시적으로 예외 Throw - .NETC# throw 문이나 Visual Basic Throw 문을 사용하여 .NET에서 명시적으로 예외를 throw하는 방법을 알아봅니다.learn.microsoft.com https://learn.microsoft.com/ko-kr/dotnet/standard/exceptions/how-to-create-user-defined-exceptions 방법: 사용자 정의 예외 만들기 - .NET.NET의 Exception 기본 클래스에서 파생된 예외 클래스의 계층 구조의 대안인 사용자 정의 예외를 ..