FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Array instantiation does not work with clean syntax · Issue #251 · pythonnet/pythonnet · GitHub

Array instantiation does not work with clean syntax #251

Description

According to readme array can be instantiated like this:

http://pythonnet.github.io/readme.html

from System import Array
myarray = Array[int](10)

However this syntax stopped working and instead need to use one of two options:

list(Array.CreateInstance(int,10)) # [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]

or

list(Array[int](range(10))) #[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


    Back | FazBrowse Home | New Git URL