Skip to content

why when created System.Array is full of None in place of 0 ? #2381

Answered by filmor
echidne asked this question in Q&A
Discussion options

You must be logged in to vote

In the first invocation, int is the Python int type, which is the object type PyInt in C#, so its default is null (None in Python). In C#, int is an alias for System.Int32, a value type with default 0.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@echidne
Comment options

Answer selected by echidne
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants