发明授权
- 专利标题: Extending expression-based syntax for creating object instances
- 专利标题(中): 扩展用于创建对象实例的基于表达式的语法
-
申请号: US11193584申请日: 2005-07-29
-
公开(公告)号: US07818719B2公开(公告)日: 2010-10-19
- 发明人: Henricus Johannes Maria Meijer , Anders Hejlsberg , Matthew J. Warren , Luca Bolognese , Peter A. Hallam , Gary S. Katzenberger , Dinesh C. Kulkarni
- 申请人: Henricus Johannes Maria Meijer , Anders Hejlsberg , Matthew J. Warren , Luca Bolognese , Peter A. Hallam , Gary S. Katzenberger , Dinesh C. Kulkarni
- 申请人地址: US WA Redmond
- 专利权人: Microsoft Corporation
- 当前专利权人: Microsoft Corporation
- 当前专利权人地址: US WA Redmond
- 代理机构: Workman Nydegger
- 主分类号: G06F9/44
- IPC分类号: G06F9/44 ; G06F9/45
摘要:
Syntax for creating object instances utilizing expressions instead of statements. A syntax component facilitates extension of conventional object-creation-expression syntax. An initializer component provides for initialization of a newly-created entity via object and collection initializers. The initializer component provides initialization of the newly-created entity utilizing an object initializer where the object initializer specifies values for one or more fields or properties of the newly-created entity which is an object, and consists of a sequence of member initializers enclosed by tokens and separated by commas. The initializer component can also provides initialization of the newly-created entity utilizing a collection initializer when the underlying object implements a certain interface or implements a certain pattern. An overloading constructor can be called as part of the initialization process. In another aspect, code inferencing is disclosed whereby given a type, the corresponding code can be inferred by the compiler and inserted for compiling by a compiler.
公开/授权文献
信息查询