Why dont you use ArrayList , its a perfect solution when you dont know the size of array you will be passing or you might go further with a List<string> which is strongly typed string arraylist.
Since it is a list it is DMA and can grow as much as you like.
if they are named params I used to passon a stringdictionary or Dictionary<string,string> iwth default values prepopulated and the replace the values from the commandline to the default values, in this way your prog always has some data / param values to operate on.
Regards
sam
Regards
sam
--- On Tue, 6/17/08, Steve Abaffy <
steve@MSMA...> wrote:
From: Steve Abaffy <
steve@MSMA...>
Subject: [DOTNET-WINFORMS] Arrays as parameters
To:
DOTNET-WINFORMS@DISC...
Date: Tuesday, June 17, 2008, 12:47 AM
Hello,
How does one do the following:
Class Someclass{
Private string [] myarray;
Public string [] MyArray {get { return myarray[];} set{myarray[]=
value;}}
}
Correctly? I want to be able to declare this class in my main function and
set the parameters of the myarray as
Someclass Sc = new someclass;
Sc.MyArray[0] = "This is test 1";
Sc.MyArray[1] = "Thisis test 2";
Etc...
Thanks
opensubscriber is not affiliated with the authors of this message nor responsible for its content.