Re: Arrays as parameters

John Warner <[email protected]> Sat, 21 Jun 2008 14:33:02 -0400
Newsgroups gmane.comp.windows.devel.dotnet.winforms
Organization House
Message-ID <00ea01c8d3cd$433c4980$c9b4dc80$@com>
Take a look at:

http://msdn.microsoft.com/en-us/library/hyfeyz71(VS.80).aspx

John Warner


> -----Original Message-----
> From: Discussion forum for developers using Windows Forms to build apps
> and controls [mailto:[email protected]] On
> Behalf Of Steve Abaffy
> Sent: Monday, June 16, 2008 3:17 PM
> To: [email protected]
> Subject: [DOTNET-WINFORMS] Arrays as parameters
>
> 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