| Automated Generation of Table Columns, Class Properties, and Form Field Mapping with C# Reflection |
| C#Today |
| In this article, Tin Lam shows how to use reflection to help us with complex mappings. Reflection allows us to examine assemblies and types at runtime, and find out everything about that type. We will also see how to dynamically extract the type information, and then carry out automated mappings between database table columns, HTML form fields and class properties. |
|
| BUG: "Object Variable or With Block Variable Not Set" Error Message When You Access a Public Object Variable (Q316478) |
| http://www.kbalertz.com/ |
| When you access a public object variable of a Component Object Model (COM) component in Visual Basic .NET, you may receive the following error message: |
|
| Calling C# assembly functions having same name differing only by case, in VB.NET |
| The Code Project |
| Calling C# assembly functions having same name differing only by case, in VB.NET. |
|
| COM Interop using Managed C++ |
| The Code Project |
| This sample demonstrates COM Interop using managed C++. Both earlyand late binding are demonstrated, and the utility TlbImp is usedto import the type library from an unmanaged COM object, |
|
| Exposing Type Information |
| C#Today |
| In his previous article, Morgan Skinner looked at the TypeDescriptor class, and how it could be used to retrieve various pieces of information from a type (or object). In certain situations however, you might want to augment or bypass the information returned from the TypeDescriptor, and in order to do this you need to implement the ICustomTypeDescriptor interface on your type. In this article, Morgan examines the ICustomTypeDescriptor interface, and show some examples of where it might be used, such as to to construct a list of properties on the fly when reading records from a database and displaying them on screen. Using the ICustomTypeDescriptor interface, it is possible to give each record its own list of properties, which might be useful if you want to permit or deny access to those properties based on some row level security settings. |
|
| Testing a Cloned Object Using Reflection |
| DotNetJunkies |
| The .NET Framework provides the IClone interface so that you can implement your own Clone() method in your class. However, since IClone is just an interface it is up to you to make sure that you are copying the properties/methods etc to the new object correctly. This can present a problem when testing your code as you need a way to programmatically check that it has all the same properties and methods, both public or private, that you would expect. In order to make sure of this you need to be able to comp |
|
| Testing: Perform Code Coverage Analysis with .NET to Ensure Thorough Application Testing |
| MSDN |
| This article presents a complete system for determining how much of your code base you're actually testing. |
|
| Using Get assembly info to locate and instantiate a variable using reflection |
| The Code Project |
| Use GetAssembly() , InvokeMember() and GetFields() to mine an assembly. |
|