Haibo Luo's weblog

ILVisualizer 2010 Solution

The projects are set to be built against the .NET 4.0. ILVisualizer2010.zip

Author: Haibo Luo - MSFT Date: 04/19/2010

IronPython: System.Reflection.Assembly object

IronPython offers a little bit more love to the Assembly object instance: we can directly access the...

Author: Haibo Luo - MSFT Date: 03/12/2008

IronPython: System.Array

When you start interop'ing with .NET in IronPython, sooner or later, you will find that you are in...

Author: Haibo Luo - MSFT Date: 03/12/2008

IronPython: ipyw.exe

Each IronPython binary release ships two executable files: ipy.exe and ipyw.exe. Their (only)...

Author: Haibo Luo - MSFT Date: 03/12/2008

SignatureResolver (unfinished)

While writing the ILVisualizer for dynamic method late 2005, I'd like to show the local variable...

Author: Haibo Luo - MSFT Date: 03/08/2008

ILVisualizer VS2008 solution

I attached the ILVisualizer VS2008 solution in this post. There is no source code update; the only...

Author: Haibo Luo - MSFT Date: 03/07/2008

IronPython: Accessing the .NET Field

The .NET libraries normally do not expose the public field, but we can still find its' presence for...

Author: Haibo Luo - MSFT Date: 10/28/2007

VisualStudio as my IronPython editor

The following steps are what I did to get Visual Studio ready as my IronPython (and IronRuby)...

Author: Haibo Luo - MSFT Date: 10/17/2007

IronPython: explicitly choose one method

C# allows method overloading. Given an argument list, the compiler performs the overload resolution...

Author: Haibo Luo - MSFT Date: 10/11/2007

IronPython: Provide (or not) Argument for by-ref Parameter

Python function may return multiple objects as a tuple. The .NET method can only return one object...

Author: Haibo Luo - MSFT Date: 10/05/2007

IronPython: Keyword Argument to Set .NET Property/Field

Use keyword arguments to set properties or fields… you likely ask the question: where can we do...

Author: Haibo Luo - MSFT Date: 10/02/2007

IronPython: Passing Arguments for a Call

After getting a CLR type, we can play it like a python type. We can get the class/static methods...

Author: Haibo Luo - MSFT Date: 10/01/2007

IronPython: Grab the .NET Type

After loading the assembly by clr.AddReference and then import namespace, we are ready to take hold...

Author: Haibo Luo - MSFT Date: 09/25/2007

IronPython: clr.AddReference

In order to interop with .NET libraries, we need first load in the assemblies we want to play with....

Author: Haibo Luo - MSFT Date: 09/25/2007

IronPython: import clr

clr is an IronPython built-in module, which provides some functionalities in order to interop with...

Author: Haibo Luo - MSFT Date: 09/25/2007

DebuggerTypeProxy for IronPython Old-style Class and Instance

First I want to make it clear that this post means nothing related to IronPython's plan about...

Author: Haibo Luo - MSFT Date: 08/03/2007

Name of Array Type

Two things related to array type name came to my mind while writing the previous post. Given an...

Author: Haibo Luo - MSFT Date: 11/29/2006

Late-bound Array SetValue

The type "System.Array" provides us a set of API for the late-bound array operations, including...

Author: Haibo Luo - MSFT Date: 11/27/2006

Set Value on Array: Performance Test

// // Please refer to https://blogs.msdn.com/haibo_luo "Late-bound array operations" post // // To...

Author: Haibo Luo - MSFT Date: 11/27/2006

Take Two: IL Visualizer

I was glad to hear many positive feedbacks about the DebuggerVisualizer for DynamicMethod; on the...

Author: Haibo Luo - MSFT Date: 11/16/2006

Turn MethodInfo to DynamicMethod

I do not know why anyone ever need this :) but few readers did ask me similar questions before....

Author: Haibo Luo - MSFT Date: 11/07/2006

Try ILReader

# Sample code to demonstrate how to use ILReader # By Haibo Luo @ https://blogs.msdn.com/haibo_luo...

Author: Haibo Luo - MSFT Date: 11/06/2006

System.Reflection-based ILReader

Compared to what I posted previously here (or what was used in the DynamicMethod visualizer), this...

Author: Haibo Luo - MSFT Date: 11/06/2006

Always Peverify IL Code of your Dynamic Method

Current dynamic method implementation does not have built-in support to pre-check whether the...

Author: Haibo Luo - MSFT Date: 11/01/2006

Shift Away from CLR Reflection Area

After 2-year Reflection test ownership and 1-year babysitting for Reflection.Emit and DynamicMethod...

Author: Haibo Luo - MSFT Date: 11/01/2006

ILGenerator.EmitCall Mainly For vararg Methods

Vararg (variable arguments) methods accept argument lists of unknown length and type. CLR supports...

Author: Haibo Luo - MSFT Date: 08/13/2006

Member Order Returned by GetFields, GetMethods ...

As John mentioned in his post, every Reflection user should keep this in mind: our code should not...

Author: Haibo Luo - MSFT Date: 07/10/2006

Reflection.Emit and Resources

Reflection.Emit is relatively new to me. Recently I had a chance to deal with a resource related...

Author: Haibo Luo - MSFT Date: 04/26/2006

My Attribute Disappears

The GetCustomAttributes scenario (ICustomAttributeProvider.GetCustomAttributes or...

Author: Haibo Luo - MSFT Date: 02/21/2006

Type.FullName returns null when ...

Type.FullName returns null when the type is not generic type definition but contains generic...

Author: Haibo Luo - MSFT Date: 02/17/2006

Hello World with DynamicILInfo

The following "Hello World" program shows how to use APIs in the class DynamicILInfo. MSDN...

Author: Haibo Luo - MSFT Date: 01/30/2006

Use IronPython to Experiment .NET Libraries

When working on .NET projects, we often need to find the right API or the proper parameters to pass...

Author: Haibo Luo - MSFT Date: 01/18/2006

Activator.CreateInstance and beyond

Q: Assume we have 2000 unknown types; (however) we know each type has a constructor with integer as...

Author: Haibo Luo - MSFT Date: 11/17/2005

LateNew source

The following code is for the post "Activator.CreateInstance and beyond" **All source code is...

Author: Haibo Luo - MSFT Date: 11/17/2005

DebuggerVisualizer for DynamicMethod (Show me the IL)

Have you ever tried DynamicMethod, one of the coolest features in the .NET 2.0? Hope you have;...

Author: Haibo Luo - MSFT Date: 10/25/2005

Read IL from MethodBody

Reflection in .NET 2.0 ships with a new class MethodBody, which "provides access to information...

Author: Haibo Luo - MSFT Date: 10/04/2005

Nested Types in Generic Classes

In C#, nested types can be defined in generic classes just like they would be in non-generic...

Author: Haibo Luo - MSFT Date: 09/28/2005

No LocalVariableInfo.Name?

This was one ladybug in MSDN product feedback center. First of all, thanks to those who filed bugs...

Author: Haibo Luo - MSFT Date: 09/02/2005

Get Names and Values of Enum Members

Yes, reflection can get this done. Assume we have an Enum type - Colors, the following code will...

Author: Haibo Luo - MSFT Date: 08/28/2005

Reflection and Nullable

You might have already read this: VS2005 made the last-minute DCR related to boxed...

Author: Haibo Luo - MSFT Date: 08/23/2005

Type.GetType(string typeName) returns null !?

Type.GetType gives us the ability to get type back from a string. We pass a well-written type name...

Author: Haibo Luo - MSFT Date: 08/21/2005