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
- react
- docker container
- 리액트
- 리덕스
- asp.net core mvc
- 리액트 리덕스
- c# delegate
- 도커 레이어
- react ts
- asp.net core
- 도커 이미지
- react typescript
- redux
- Docker
- docker layer
- C#
- ASP Core
- js
- asp core 권한
- javascript
- Git
- 도커
- Asp Net Core
- asp core mvc
- 도커 컨테이너
- React Redux
- vscode extension
- 리액트 타입스크립트
- Docker image
- 리액트 타입스크립트 적용하기
Archives
- Today
- Total
기초 메모지
C# - 제네릭 컬렉션 - 딕셔너리(Dictionary) 본문
딕셔너리(Dictionary)는 Key, Value Pair 형태를 가지고 있습니다.
딕셔너리의 특성은 아래와 같습니다.
1. 선언 시 Key 타입과, Value 타입을 받습니다.
// Key, Value Pair 형식으로 Key 타입, Value 타입을 받고 있습니다.
Dictionary<string, string> dic = new Dictionary<string, string>();
2. Key는 고유한 값으로 중복될 수 없습니다.
dic.Add("Key A", "Value A");
// 중복된 키 삽입 시 에러 발생.
dic.Add("Key A", "Value B");
3. 인덱스로 Key를 받아 Pair Value를 반환 합니다.
Console.WriteLine(dic["Key A"]);
// Value A
반응형
'Languages > C#' 카테고리의 다른 글
C# - ref, out 언제 사용할까? (0) | 2022.06.30 |
---|---|
C# - 접근 제한자(Access Modifier) (0) | 2022.06.30 |
C# - 제네릭 컬렉션 - 리스트와 배열 (0) | 2022.06.30 |
C# - 제네릭 컬렉션(Generic Collection) (0) | 2022.06.30 |
C# - 내장 리소스(Embedded Resource) (0) | 2022.06.29 |
Comments