IronPythonで参照渡しが必要なメソッドを利用する

>>> import clr
>>> from System import *
>>> ref = clr.Reference[Int32](0)
>>> hoge = Int32.TryParse("123", ref)
>>> hoge
True
>>> ref.Value
123
>>>
>>> fuga, piyo = Int32.TryParse("123")
>>> fuga
True
>>> piyo
123

コメントを残す

メールアドレスが公開されることはありません。 が付いている欄は必須項目です

This site uses Akismet to reduce spam. Learn how your comment data is processed.