sq / JSIL

CIL to Javascript Compiler

Home Page:http://jsil.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Assembly.GetType is not working for generics.

tosandeepgarg opened this issue · comments

Following code doesn't work.

typeof(object).Assembly.GetType(
                "System.Collections.Generic.Dictionary`2[[System.Int32, mscorlib],[System.Object, mscorlib]]");

Here is test case:

using System;

public static class Program
{
    public static void Main(string[] args)
    {
        var typeInt32 = typeof(object).Assembly.GetType("System.Int32");
        var typeDictionary =
            typeof (object).Assembly.GetType(
                "System.Collections.Generic.Dictionary`2[[System.Int32, mscorlib],[System.Object, mscorlib]]");
        Console.WriteLine(
            "{0} {1}", typeInt32.Name, typeDictionary.Name
            );

    }
}