[C#] 현재 method 및 class 정보 얻기
C#에서 logging 등의 이유로 현재 실행중인 method나 class의 이름과 같은 정보가 필요할때 `System.Reflection`나 `System.Diagnostics` 네임스페이스의 기능들을 사용할 수 있다. - System.Reflection - 런타임에 어셈블리, type 및 member에 대한 메타데이터 접근 기능 제공 - 주요 클래스 : Assembly, Type, MethodInfo - System.Diagnostics - 런타임에 application을 모니터링하고 디버깅할 수 있는 기능 제공 - 주요 클래스 : Process, StackTrace, StackFrame, Debug 예를들어 로그 찍을때 - 현재 class명 : `MethodBase.GetCurrentMethod()..
Programming/Languages
2023. 3. 1. 15:25
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
링크
TAG
- VS2022
- async
- Addressables
- 유니티
- 싱글톤
- framework
- 코루틴
- 닷넷
- 비동기
- gcp
- firestore
- initialize
- Scraping
- unity
- selenium
- github
- Debug
- Custom Package
- Singleton
- await
- logging
- C#
- Visual Studio Code
- Python
- RuntimeInitializeOnLoadMethod
- .net
- git
- vscode
- 환경설정
- coroutine
| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 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 |
글 보관함