Skip to content
This repository has been archived by the owner on Aug 24, 2022. It is now read-only.

Assembly.GetType is not working for generics. #1035

Open
tosandeepgarg opened this issue Feb 24, 2017 · 0 comments
Open

Assembly.GetType is not working for generics. #1035

tosandeepgarg opened this issue Feb 24, 2017 · 0 comments
Labels

Comments

@tosandeepgarg
Copy link

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
            );

    }
}
@kg kg added the Bug label Feb 24, 2017
tosandeepgarg pushed a commit to SabaSoftware/JSIL that referenced this issue Feb 24, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants