Some useful reflection helpers, including an IL disassembler.
Switch branches/tags
Nothing to show
Clone or download
jbevain Merge pull request #13 from hazzik/patch-1
Fix Instruction.Size throwing InvalidCastException
Latest commit e8299e2 Feb 10, 2016
Failed to load latest commit information.
Mono.Reflection Fix Instruction.Size throwing InvalidCastException Feb 9, 2016
Test Handle disassembling ldarg 0 Feb 6, 2016
.gitignore Update .gitignore Jan 13, 2012
Mono.Reflection.csproj update to vs2010 Sep 24, 2010
Mono.Reflection.nuspec Bump to 1.1 Feb 6, 2016
Mono.Reflection.sln update to vs2010 Sep 24, 2010
mono.snk strong name mono.reflection Jan 22, 2010


Mono.Reflection is an helper library to complement the System.Reflection and System.Reflection.Emit namespaces.

It works on both Mono >= 2.8 and .net >= 4.0.


public sealed class Image {
	public static bool IsAssembly (string fileName) {}
	public static bool IsAssembly (Stream stream) {}

Test whether a file is a managed assembly or not.

public static class BackingFieldResolver {
	public static FieldInfo GetBackingField (this PropertyInfo self) {}

Returns the field backing a property or throws an InvalidOperationException.

public static class Disassembler {
	public static IList<Instruction> GetInstructions (this MethodBase self) {}

Returns a read only collection of Instruction representing the IL method body or throws an ArgumentException if the method doesn't provide a body.

public class Instruction {
	public int Offset { get; }
	public OpCode OpCode { get; }
	public object Operand { get; }

	public Instruction Next { get; }
	public Instruction Previous { get; }

Represents an IL instruction.