C#/기초
-
[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 기본 클래스에서 파생된 예외 클래스의 계층 구조의 대안인 사용자 정의 예외를 ..
-
[C#] in,out, ref keywordC#/기초 2024. 8. 12. 11:06
https://learn.microsoft.com/ko-kr/dotnet/csharp/language-reference/keywords/out out 키워드 - C# referenceout 키워드 - C# 참조learn.microsoft.com https://programing-note.tistory.com/entry/C-RefOut-%ED%82%A4%EC%9B%8C%EB%93%9C-%EC%99%80-in-%ED%82%A4%EC%9B%8C%EB%93%9C C# Ref,Out 키워드 와 in 키워드Ref 키워드와 Out 키워드를 더 잘 이해하기 위해서는 call by refurence , call by value를 알고 보는 게 좋다. Ref , Out 키워드 정의부터 설명하자면 Ref Pa..
-
[C#] C++DLL , C# 호출C#/기초 2024. 7. 31. 14:10
https://naakjii.tistory.com/120 2. C++ DLL을 C#에서 이용하기2023.01.31 - [개발/C++] - 1. VS 2019에서 C++ 프로젝트를 DLL로 빌드하기 1. C++ DLL을 C#에서 사용하는 간단한 예제 C++ DLL(CPP.dll) #include extern "C" __declspec(dllexport) int AddNumbers(int a, int b) { return a + b; } C# using Sysnaakjii.tistory.com https://learn.microsoft.com/ko-kr/dotnet/framework/interop/marshalling-data-with-platform-invoke 플랫폼 호출로 데이터 마샬링 - .NET..
-
[C#] Nuget publishC#/기초 2024. 7. 31. 10:56
https://learn.microsoft.com/en-us/nuget/quickstart/create-and-publish-a-package-using-the-dotnet-cli Create and publish a NuGet package with the dotnet CLIWalk through quickly creating and publishing a NuGet package by using the dotnet CLI.learn.microsoft.com
-
[C#] regsvr32 레지스트리 DLL 등록C#/기초 2024. 7. 23. 15:01
코드에서 등록 using System.Diagnostics;…public static void registerDLL(string dllPath){ try { //'/s' : indicates regsvr32.exe to run silently. string fileinfo = "/s" + " " + "\"" + dllPath + "\""; Process reg = new Process(); reg.StartInfo.FileName = "regsvr32.exe"; reg.StartInfo.Arguments = fileinfo; reg.StartInfo.UseShellExecute = false; reg.StartInfo.CreateNoWindow = true; ..
-
[C#] DllImportC#/기초 2024. 7. 23. 08:33
SetDllDirectory string dllPath = Path.Combine(Directory.GetCurrentDirectory() , "dllImport");[DllImport("kernel32.dll", CharSet = CharSet.Auto, SetLastError = true)]static extern bool SetDllDirectory(string lpPathName); public ManagerClientExportTest() { var isSet = SetDllDirectory(dllPath); } https://stackoverflow.com/questions/8836093/how-can-i-specify-a-dllimport-path-at-ru..
-
[C#] nuget.ConfigC#/기초 2024. 7. 19. 11:45
솔루션 root폴더에 nuget.config 파일생성 value = " 패키지소스 상대경로 지정" 피드 추가 방법. Global Package SourceThe global package source lives in %appdata%\nuget\nuget.config and looks like this: ... This configuration is set when you make changes to your package source configuration in most IDE tools like Visual Studio, Rider, OmniSharp etc.Solution Local Package SourceBut you can also override t..