[IronPython] Why Method call is not working?

senthilkumar senthilkumar.chockalingam at kla-tencor.com
Thu Sep 16 12:31:10 CEST 2004


I'm trying to call a method of a .Net component, but it allways throws
error.

here is the code i executed
1. o = sampleGAC.TestClass //(Namespace.classname)//works fine
2. o.ReturnTest() // not working, allways produce error as follws

System.IndexOutOfRangeException: Index was outside the bounds of the array.
   at IronPython.Objects.ReflectedMethodBase.BindArgs(MethodBase info,
Object& instance, Object[] args)
   at IronPython.Objects.ReflectedMethodBase.Call(Object[] args)
   at IronPython.Objects.Ops.Call(Object func)
   at input_21.Run(Frame frame)
   at
klatencor.cp.apps.programs.CPythonInterpreter.CPythonInteractiveInterpreter.
pushCommand(String strCommand) in
e:\projects\cpythonwizard\cpythoninteractiveinterpreter\cpythoninteractivein
terpreter.cs:line 39

I also tried with .new System Components, i created a instance of datetime
and tries to access the method ToLongTimeString(), as

o = System.DateTime //works fine
o.ToLongTimeString  //Error

it also produces the same error ( Index was outside the bounds of the
array ).

Is there anything wrong in calling the method.

please assist me
Thanks in advance
Senthil Kumar




More information about the Ironpython-users mailing list