Microsoft MVP성태의 닷넷 이야기
.NET : 70. C# 4.0 - Dynamic Lookup [링크 복사], [링크+제목 복사],
조회: 14383
글쓴 사람
정성태 (techsharer at outlook.com)
홈페이지
첨부 파일
 
(연관된 글이 1개 있습니다.)

Future Focus I: Dynamic Lookup
; https://learn.microsoft.com/en-us/archive/blogs/charlie/future-focus-i-dynamic-lookup

와... 재미있는 기능이네요. ^^
일정 영역 내부의 코드에 대해서는 정적 구문 검사를 적용하지 않는다는.

그동안 사용했던 지저분한 Reflection 구문이 많이 단순해지겠군요. 그나저나... 어쨌든 Reflection을 쓴다 해도 interface 기반으로 작성을 해서 가능한 정적 구문 검사 영역에 들게 하는 것이 최선이죠.

암튼. ^^ 다음과 같은 식의 구문이 가능하다고 합니다. (물론, 확정된 것은 아니라고 하는군요.)

static void Main(string[] args)
{
    dynamic
    {
        object myDynamicObject = GetDynamicObject();
        myDynamicObject.SomeMethod(); // call a method
        myDynamicObject.someString = "value"; // Set a field
        myDynamicObject[0] = 25; // Access an indexer
    }
}


[연관 글]






[최초 등록일: ]
[최종 수정일: 5/30/2024]


비밀번호

댓글 작성자
 




... 31  32  33  34  35  36  37  38  39  40  [41]  42  43  44  45  ...
NoWriterDateCnt.TitleFile(s)
160정성태4/13/200611650MS 인증서버 : 인증서 유효 기간 기본값 변경
157정성태4/13/200611135Converting a managed PDB into a XML file
158정성태4/13/200610480    답변글 [추가]: A SymWriter sample is coming...
156정성태4/13/200611480Method Call Interception (MCI) in C++
155정성태4/13/200610997Web Project Conversion Wizard
154정성태12/21/200511735Interprocess Communication Using the Running Object Table (ROT)파일 다운로드1
153정성태4/13/200611329Assembly loading failure is expensive [1]
152정성태4/13/200611738ASCX 컨트롤을 커스텀 컨트롤로 사용하는 방법.
151정성태4/13/200610657TechNet 세미나 목록
150정성태4/13/200610754SCDL Tool [2]
149정성태4/13/200610809Disk (based) Output Cache
147정성태4/13/200610695CLR Profiler for the .NET Framework 2.0
146정성태4/13/200611656Scriptomatic Version 2.0 by the Microsoft Scripting Guys
145정성태4/13/200611152Windows Server 2003 R2 [2]
144정성태4/13/200611622WTL(Windows Template Library) 7.5
143정성태4/13/200611877.NET 1.1 에서 WebService Client 의 KeepAlive = false; 설정
142정성태4/13/200611063Virtual Server 2005 R2 (x86, x64) EE 180-day Evaluation [2]
141정성태4/13/200611705.NET 표준개발 가이드와 Microsoft.Framework 공개
140정성태4/13/200610167PAINT.NET
139정성태11/30/20051119012월 세미나 행사
137정성태11/17/200510615WSE 3.0 정식 버전
162정성태4/13/200611271    답변글 [추가]: Web Service Security Guide
136정성태11/17/200510909Creating an Outlook My.Blogs Managed Code Add-in
138정성태11/24/200510337    답변글 Ceating an Outlook Business Contact Assistant Add-in with Visual Studio Tools for Office
135정성태11/16/200510685What's port 445 used for in Windows 2000/XP?파일 다운로드1
134정성태11/15/200510675Microsoft SQL Server Management Studio Express - Community Technical Preview (CTP) November 2005 [1]
... 31  32  33  34  35  36  37  38  39  40  [41]  42  43  44  45  ...