본문 바로가기
반응형

Works/C#5

Covariance and Contravariance Covariance and Contravariance (C#) 용어 정리 Invariance Means that you can use only the type originally specified. An invariant generic type parameter is neither covariant nor contravariant. You cannot assign an instance of List to a variable of type List or vice versa. Variance Convariance Enables you to use a more derived type than originally specified. You can assign an instance of IEnumerable to.. 2022. 1. 19.
C# 암호화 변수 암호화 코드 using System.IO; using System.Security.Cryptography; public static class CryptoFunc { private static byte[] _key = { 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16 }; private static byte[] _iv = { 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16 }; private static Aes _aes = null; private static v.. 2020. 9. 23.
[.NET] Windows Registry 등록/삭제 Custom URI Scheme 를 테스트 하다가 Windows 에 Registry 를 자동으로 등록/삭제 하면 편하겠다는 생각이 들어 찾아보게 되었습니다. 공식 문서를 찾아봅니다. https://docs.microsoft.com/ko-kr/dotnet/api/microsoft.win32.registry?view=netframework-4.5 Registry Class (Microsoft.Win32) Windows 레지스트리의 루트 키를 나타내는 개체와 키/값 쌍에 액세스하는 static 메서드를 제공합니다.Provides objects that represent the root keys in the Windows registry, and static methods to access key/value p.. 2019. 9. 8.
[.NET] Java Bridge C# 개발 환경에서 Java 와 통신을 해야 할 일이 생겼습니다.JavaBridge 라는 키워드를 들고 찾아보니 jni4net 이라는 라이브러리가 나옵니다.jni4netJava의 라이브러리(jar)를 C# 라이브러리(dll)로 바꾸어주는 일을 합니다. 해당 라이브러리의 사용법은 다음과 같습니다. 다운로드 링크링크에서 원하는 버전을 선택 합니다.파일 목록 중 bin이 들어간 파일을 다운 받습니다.압축을 해제합니다. 사용할 jar 압축 해제한 폴더에 넣어줍니다.해당 폴더에서 커맨드 창을 열어줍니다.다음과 같이 입력합니다.bin\proxygen.exe FILE_NAME.jar -wd .\PS. C 드라이브가 아닌 다른 드라이브에서 할 경우 실패할 수 있다고 합니다. DLL 생성을 위한 파일들이 생성됩니다.여기.. 2019. 3. 22.
반응형