[IronPython] Type.GetType returns None

Michael Foord fuzzyman at voidspace.org.uk
Sat Mar 10 15:48:37 CET 2007


Michael Foord wrote:
> Hello all,
>
> Why does "Type.GetType(string)" return None from IronPython ?
>
> I need to use it with names like "Console", "int" and "string" - 
> fetching the .NET type objects. I guess this is because of the reflected 
> types ? Do I have an alternative that will work ? (other than stub C#).
>   
Interesting - even with the following C# called from IronPython it 
returns None. The code I am translating is from the MSDN docs. Any clues ?

namespace SimpleTest
{
    public class SimpleTest
    {
        public static Type getType(string typename){
            return Type.GetType(typename);
        }
}

Michael Foord
http://www.voidspace.org.uk/ironpython/

> All the best,
>
> Michael Foord
>
> http://www.voidspace.org.uk/ironpython/
> _______________________________________________
> users mailing list
> users at lists.ironpython.com
> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
>
>   




More information about the Ironpython-users mailing list