일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 |
Tags
- gitlab
- Algorithm
- jupyter lab
- vim
- c언어
- git
- HTML
- c# 윈폼
- C++
- 구조체
- jupyter
- Data Structure
- 깃
- github
- docker
- c# 추상 클래스
- 플러터
- c# winform
- Unity
- c#
- 다트 언어
- dart 언어
- 유니티
- 도커
- Houdini
- Python
- C# delegate
- Flutter
- 포인터
- C언어 포인터
Archives
- Today
- Total
목록c# 정렬 (1)
nomad-programmer
[Programming/C#] 일반화 대리자
대리자는 보통의 메소드뿐 아니라 일반화 메소드도 참조할 수 있다. 물론 이 경우에는 대리자도 일반화 메소드를 참조할 수 있도록 형식 매개 변수를 이용하여 선언되어야 한다. 형식 매개 변수를 이용해서 대리자를 선언하는 요령은 메소드와 같다. 괄호 사이에 형식 매개 변수를 넣어주면 된다. 일반화 대리자 예제 using System; namespace test { delegate int Compare(T a, T b); internal class Program { static int AscendCompare(T a, T b) where T: IComparable { return a.CompareTo(b); } static int DescendCompare(T a, T b) where T : IComparabl..
Programming/C#
2020. 9. 22. 20:37