일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 | 31 |
Tags
- csharp
- git
- 코딩테스트
- programmers
- C#
- Microsoft
- tls
- chashtag
- log
- logging
- .net
- Coding
- windows10
- commit
- nullable
- convert
- Github
- IValueConverter
- File
- Visual Studio
- ListView
- windows
- Binding
- Process
- dotNET
- coding-test
- string
- mysql
- algorithm
- WPF
Archives
- Today
- Total
목록Exception (2)
CHashtag

결론만 알려드리겠습니다. int defaultValue = 999; int? nullableInt = null; // int wrongResult = (int)nullableInt; // System.InvalidOperationException here int result = nullableInt.GetValueOrDefault(defaultValue); // 999 감사합니다.
C#
2021. 2. 18. 00:50

아래와 같은 클래스가 있습니다. class Program { internal static List Items = new List(); static void Main(string[] args) { AddDummyValues(); RemoveDummyValues(); } internal static void AddDummyValues() { for(int i = 0; i { Items.Remove(x); }); } } 실행해보면 아래와 같은 예외가 발생합니다. 이는 Remove 뿐만 아니라 Add를 해도 동일한 예외가 발생합..
C#
2020. 10. 26. 01:06