Invention Grant
- Patent Title: Using extension methods to extend COM objects
- Patent Title (中): 使用扩展方法扩展COM对象
-
Application No.: US12046446Application Date: 2008-03-12
-
Publication No.: US08296730B2Publication Date: 2012-10-23
- Inventor: David Andrew Whitechapel , Vladimir Morozov , Phillip Michael Hoff
- Applicant: David Andrew Whitechapel , Vladimir Morozov , Phillip Michael Hoff
- Applicant Address: US WA Redmond
- Assignee: Microsoft Corporation
- Current Assignee: Microsoft Corporation
- Current Assignee Address: US WA Redmond
- Main IPC: G06F9/44
- IPC: G06F9/44 ; G06F9/45

Abstract:
When objects are called by a program written in a strongly-typed language using an interface written in a loosely-typed manner, incompatibilities between the programming languages can cause problems. Extension methods can simplify the interface between objects in an object model and a program written in a strongly-typed programming language by providing method overloads that accept strongly-typed parameters. Extension methods are provided that use method overloads that accept strongly-typed parameters, improving type safety by allowing the compiler to enforce type safety rather than relying on type checking at runtime. Nullable types and object initialization may be used to provide strongly-typed optional parameters. Extension methods can be used to support parameterized properties and to support class indexers, enabling query of collections of in-memory objects.
Public/Granted literature
- US20090234804A1 USING EXTENSION METHODS TO EXTEND COM OBJECTS Public/Granted day:2009-09-17
Information query