Notice
Recent Posts
Recent Comments
Link
| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 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
- 인프런
- 기술면접
- 벡터
- 스택영역
- map
- 배열
- 알고리즘
- 반복문
- 객체지향
- Queue
- 큐
- static_cast
- std::map
- 차이점
- 공부
- rookiss
- 힙영역
- 해쉬맵
- list
- thread
- std::unordered_map
- c#
- 멀티쓰레드
- 트리
- vector
- 리스트
- MonoBehaviour
- 스택
- 프래그멘테이션
- 자료구조
Archives
- Today
- Total
목록OUT (1)
호빵의 IT 개발소
[C#] 14. ref, out
//ref(참조)를 사용한 a b Swap함수 만들기 ref(참조)는 밑에 예제로 간단하게 설명하자면 Main함수에서 선언된ref num1과ref num2 안에 있는 숫자를 진퉁으로 Swap함수 매개변수목록에 있는 ref int a, ref int b로 넘겨준 다음 Swap에서 a과 b의 숫자를 서로 교환하는 작업을 한 뒤 다시 ref num1과 ref num2로 넘겨주는 작업입니다. class Program { Static void Swap(ref int a, ref int b) { int temp = a; a = b; b = temp; } Static void Main(string[] args) { int num1 = 3; int num2 = 7; Program.Swap(ref num1, ref nu..
C#, 유니티/C# 기초
2021. 12. 30. 23:51