c# - How to invoke a .Net method with unsigned integer argument from IronPython -


the method in csharp have 2 variants

    public class mmsvalue     {         public mmsvalue (int value)         {             valuereference = mmsvalue_newintegerfromint32 (value);         }          public mmsvalue (uint32 value)         {             valuereference = mmsvalue_newunsignedfromuint32(value);         } 

when call ironpython, invokes mmsvalue(int value). there way call mmsvalue(uint32 value)?

taken ironpython documentation: http://ironpython.net/documentation/dotnet/

if want control exact overload gets called, can use overloads method on method objects:

import clr clr.addreference('classlibrary1') classlibrary1 import mmsvalue system import uint32      uint32_mmsvalue = mmsvalue.__new__.overloads[uint32](mmsvalue, 1) 

this create instance of mmsvalue using uint32 constructor.


Comments

Popular posts from this blog

qt - Using float or double for own QML classes -

Create Outlook appointment via C# .Net -

ios - Swift Array Resetting Itself -