I would like to use System.Array.

The following code is running with iron python

import clr
import System
from System import Array
from System import Int32
from clr import GetClrType
rows = 1
columns = 2
#method: Array.CreateInstance(Type, Int32, Int32)
array = Array.CreateInstance(GetClrType(Int32), rows, columns)
print array.GetLength(0)
print array.GetLength(1)

ouptput:
1
2

The same code throws an import error in python for .NET
    from clr import GetClrType
ImportError: cannot import name GetClrType

Is another syntax for python for .Net necessary?
Or is there perhaps another method to pass a Type to a method?
_________________________________________________
Python.NET mailing list - PythonDotNet@python.org
http://mail.python.org/mailman/listinfo/pythondotnet

Reply via email to