Return to Snippet

Revision: 17758
at September 14, 2009 03:36 by manatlan


Updated Code
#/////////////////////////////:
# pass a arg by ref
#/////////////////////////////:
err=clr.Reference[str]("")
yourMethod(err)

#/////////////////////////////:
# pass a arg by ref
#/////////////////////////////:
from System.Collections.Generic import *
l=List[str]()
l.Add("val1")
l.Add("val2")

#/////////////////////////////:
# get arguments from commandline
#/////////////////////////////:
from System import Environment
argv = list(Environment.GetCommandLineArgs())

Revision: 17757
at September 14, 2009 03:35 by manatlan


Updated Code
#/////////////////////////////:
# pass a arg by ref
#/////////////////////////////:
err=clr.Reference[str]("")
yourMethod(err)

#/////////////////////////////:
# pass a arg by ref
#/////////////////////////////:
from System.Collections.Generic import *
l=List[str]()
l.Add("val1")
l.Add("val2")

Revision: 17756
at September 14, 2009 03:29 by manatlan


Initial Code
err=clr.Reference[str]("")
yourMethod(err)

Initial URL

                                

Initial Description

                                

Initial Title
ironpython : tricks  :  pass arg by ref, generics, get argv

Initial Tags

                                

Initial Language
Python