부모글 보이기/감추기 AD BLOCK 해제 요청 이 글에는 광고가 많이 들어가 있지 않습니다. adblock을 해제하셔도 글을 읽는데 그다지 부담이 없으니 해제를 부탁드립니다. (연관된 글이 15개 있습니다.) C# 9.0 - (8) 정적 익명 함수 (static anonymous functions) C# 9.0 - (1) 대상으로 형식화된 new 식(Target-typed new expressions) ; https://www.sysnet.pe.kr/2/0/12363 C# 9.0 - (2) localsinit 플래그 내보내기 무시(Suppress emitting localsinit flag) ; https://www.sysnet.pe.kr/2/0/12364 C# 9.0 - (3) 람다 메서드의 매개 변수 무시(Lambda discard parameters) ; https://www.sysnet.pe.kr/2/0/12365 C# 9.0 - (4) 원시 크기 정수(Native ints) ; https://www.sysnet.pe.kr/2/0/12366 C# 9.0 - (5) 로컬 함수에 특성 지정 가능(Attributes on local functions) ; https://www.sysnet.pe.kr/2/0/12372 C# 9.0 - (6) 함수 포인터(Function pointers) ; https://www.sysnet.pe.kr/2/0/12374 C# 9.0 - (7) 패턴 일치 개선 사항(Pattern matching enhancements) ; https://www.sysnet.pe.kr/2/0/12383 C# 9.0 - (8) 정적 익명 함수 (static anonymous functions) ; https://www.sysnet.pe.kr/2/0/12389 C# 9.0 - (9) 레코드 (Records) ; https://www.sysnet.pe.kr/2/0/12392 C# 9.0 - (10) 대상으로 형식화된 조건식(Target-typed conditional expressions) ; https://www.sysnet.pe.kr/2/0/12399 C# 9.0 - (11) 공변 반환 형식(Covariant return types) ; https://www.sysnet.pe.kr/2/0/12402 C# 9.0 - (12) foreach 루프에 대한 GetEnumerator 확장 메서드 지원(Extension GetEnumerator) ; https://www.sysnet.pe.kr/2/0/12403 C# 9.0 - (13) 모듈 이니셜라이저(Module initializers) ; https://www.sysnet.pe.kr/2/0/12404 C# 9.0 - (14) 부분 메서드에 대한 새로운 기능(New features for partial methods) ; https://www.sysnet.pe.kr/2/0/12405 C# 9.0 - (15) 최상위 문(Top-level statements) ; https://www.sysnet.pe.kr/2/0/12406 C# 9.0 - (16) 제약 조건이 없는 형식 매개변수 주석(Unconstrained type parameter annotations) ; https://www.sysnet.pe.kr/2/0/12423 (이번 실습은 - 오늘 기준 16.7.7의 Visual Studio 2019에서는 컴파일이 안 되고 "16.8.x"의 Preview 버전에서 가능합니다.) C# 7.0에 로컬 함수(Local function)가 추가되고, C# 8.0에 로컬 함수의 static 정의가 가능해졌는데요. 마찬가지로 (C# 3.0부터 있었던) 람다 식과 (C# 2.0부터 있었던) 익명 메서드에 (이제서야) static 정의를 할 수 있게 되었습니다. 기능은 동일하게, 람다 및 익명 메서드 내에서 외부 scope의 변수를 명시적으로 캡처하지 못하게 만드는 역할을 합니다. using System; class Program { static void Main(string[] args) { { string title = "console: "; Func<int, string> func = static i => { // Error CS8820 A static anonymous function cannot contain a reference to 'title'. // return title + i.ToString(); return i.ToString(); }; Console.WriteLine(func(10)); } { const string title = "console: "; Func<int, string> func = static delegate (int i) { // const 변수의 경우 참조에 대한 부작용이 없으므로 사용 가능 return title + i.ToString(); }; Console.WriteLine(func(10)); } } } (첨부 파일은 이 글의 예제 코드를 포함합니다.) [이 글에 대해서 여러분들과 의견을 공유하고 싶습니다. 틀리거나 미흡한 부분 또는 의문 사항이 있으시면 언제든 댓글 남겨주십시오.] [다음 글] 디버깅 기술: 173. windbg - System.Configuration.ConfigurationErrorsException 예외 분석 방법[이전 글] 오류 유형: 674. 어느 순간부터 닷넷 응용 프로그램 실행 시 System.Configuration.ConfigurationErrorsException 예외가 발생한다면? [연관 글] .NET Framework: 947. C# 9.0 - (1) 대상으로 형식화된 new 식(Target-typed new expressions).NET Framework: 948. C# 9.0 - (2) localsinit 플래그 내보내기 무시(Suppress emitting localsinit flag).NET Framework: 949. C# 9.0 - (3) 람다 메서드의 매개 변수 무시(Lambda discard parameters).NET Framework: 950. C# 9.0 - (4) 원시 크기 정수(Native ints).NET Framework: 951. C# 9.0 - (5) 로컬 함수에 특성 지정 가능(Attributes on local functions).NET Framework: 953. C# 9.0 - (6) 함수 포인터(Function pointers).NET Framework: 956. C# 9.0 - (7) 패턴 일치 개선 사항(Pattern matching enhancements).NET Framework: 959. C# 9.0 - (9) 레코드(Records).NET Framework: 961. C# 9.0 - (10) 대상으로 형식화된 조건식(Target-typed conditional expressions).NET Framework: 962. C# 9.0 - (11) 공변 반환 형식(Covariant return types).NET Framework: 963. C# 9.0 - (12) foreach 루프에 대한 GetEnumerator 확장 메서드 지원(Extension GetEnumerator).NET Framework: 964. C# 9.0 - (13) 모듈 이니셜라이저(Module initializers).NET Framework: 965. C# 9.0 - (14) 부분 메서드에 대한 새로운 기능(New features for partial methods).NET Framework: 966. C# 9.0 - (15) 최상위 문(Top-level statements).NET Framework: 974. C# 9.0 - (16) 제약 조건이 없는 형식 매개변수 주석(Unconstrained type parameter annotations) [최초 등록일: 11/1/2020] [최종 수정일: 11/22/2020] 이 저작물은 크리에이티브 커먼즈 코리아 저작자표시-비영리-변경금지 2.0 대한민국 라이센스에 따라 이용하실 수 있습니다. by SeongTae Jeong, mailto:techsharer at outlook.com 비밀번호 댓글 작성자 ... 76 77 78 79 80 81 82 83 [84] 85 86 87 88 89 90 ... NoWriterDateCnt.TitleFile(s) 11833정성태3/4/201920996개발 환경 구성: 431. Visual Studio 2019 - CMake를 이용한 공유/실행(so/out) 리눅스 프로젝트 설정111832정성태3/4/201916948오류 유형: 524. Visual Studio CMake - rsync: connection unexpectedly closed11831정성태3/4/201916751오류 유형: 523. Visual Studio 2019 - 새 창으로 뜬 윈도우를 닫을 때 비정상 종료11830정성태2/26/201916453오류 유형: 522. 이벤트 로그 - Error opening event log file State. Log will not be processed. Return code from OpenEventLog is 87.11829정성태2/26/201918175개발 환경 구성: 430. 마이크로소프트의 CoreCLR 프로파일러 예제 빌드 방법 - 리눅스 환경 [1]11828정성태2/26/201926071개발 환경 구성: 429. Component Services 관리자의 RuntimeBroker 설정이 2개 있는 경우 [8]11827정성태2/26/201919030오류 유형: 521. Visual Studio - Could not start the 'rsync' command on the remote host, please install it using your system package manager.11826정성태2/26/201919214오류 유형: 520. 우분투에 .NET Core SDK 설치 시 패키지 의존성 오류11825정성태2/25/201924404개발 환경 구성: 428. Visual Studio 2019 - CMake를 이용한 리눅스 빌드 환경 설정 [1]11824정성태2/25/201918837오류 유형: 519. The SNMP Service encountered an error while accessing the registry key SYSTEM\CurrentControlSet\Services\SNMP\Parameters\TrapConfiguration. [1]11823정성태2/21/201920606오류 유형: 518. IIS 관리 콘솔이 뜨지 않는 문제11822정성태2/20/201918858오류 유형: 517. docker에 설치한 MongoDB 서버로 연결이 안 되는 경우11821정성태2/20/201919624오류 유형: 516. Visual Studio 2019 - This extension uses deprecated APIs and is at risk of not functioning in a future VS update. [1]11820정성태2/20/201922680오류 유형: 515. 윈도우 10 1809 업데이트 후 "User Profiles Service" 1534 경고 발생11819정성태2/20/201921972Windows: 158. 컴퓨터와 사용자의 SID(security identifier) 확인 방법11818정성태2/20/201920005VS.NET IDE: 131. Visual Studio 2019 Preview의 닷넷 프로젝트 빌드가 20초 이상 걸리는 경우 [2]11817정성태2/17/201916382오류 유형: 514. WinDbg Preview 실행 오류 - Error : DbgX.dll : WindowsDebugger.WindowsDebuggerException: Could not load dbgeng.dll 11816정성태2/17/201919791Windows: 157. 윈도우 스토어 앱(Microsoft Store App)을 명령행에서 직접 실행하는 방법11815정성태2/14/201918039오류 유형: 513. Visual Studio 2019 - VSIX 설치 시 "The extension cannot be installed to this product due to prerequisites that cannot be resolved." 오류 발생11814정성태2/12/201916866오류 유형: 512. VM(가상 머신)의 NT 서비스들이 자동 시작되지 않는 문제11813정성태2/12/201918286.NET Framework: 809. C# - ("Save File Dialog" 등의) 대화 창에 확장 속성을 보이는 방법11812정성태2/11/201915547오류 유형: 511. Windows Server 2003 VM 부팅 후 로그인 시점에 0xC0000005 BSOD 발생11811정성태2/11/201920696오류 유형: 510. 서버 운영체제에 NVIDIA GeForce Experience 실행 시 wlanapi.dll 누락 문제11810정성태2/11/201918460.NET Framework: 808. .NET Profiler - GAC 모듈에서 GAC 비-등록 모듈을 참조하는 경우의 문제11809정성태2/11/201920541.NET Framework: 807. ClrMD를 이용해 메모리 덤프 파일로부터 특정 인스턴스를 참조하고 있는 소유자 확인11808정성태2/8/201921866디버깅 기술: 123. windbg - 닷넷 응용 프로그램의 메모리 누수 분석 ... 76 77 78 79 80 81 82 83 [84] 85 86 87 88 89 90 ...