Yep, that's fine - C# creates a new array on every params call.
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Dan Eloff
Sent: Saturday, October 11, 2008 2:00 PM
To: Discussion of IronPython
Subject: Re: [IronPython] Why would you use MakeList over MakeLi
On Sat, Oct 11, 2008 at 3:38 PM, Dino Viehland <[EMAIL PROTECTED]> wrote:
> The difference is whether or not you're the owner of the array. If you've
> accepted the array from some public location, even if it was a params method,
> someone else could own the array and continue to modify it. If
The difference is whether or not you're the owner of the array. If you've
accepted the array from some public location, even if it was a params method,
someone else could own the array and continue to modify it. If you've created
the array yourself or can guarantee it won't change then it can
///
/// Python runtime helper to create a populated instance of
Python List object.
///
public static List MakeList(params object[] items) {
return new List(items);
}
///
/// Python runtime helper to create a populated instance