Re: Arrays as parameters
Robert Lee <[email protected]> Sat, 21 Jun 2008 15:52:48 -0400
| Newsgroups | gmane.comp.windows.devel.dotnet.winforms |
|---|---|
| Message-ID | <006b01c8d3d8$61a26b10$24e74130$@net> |
Steve, Once I posted I realized that I probably misunderstood your question. Are you having an issue with the dimensions of the array? Outside of the fact that there are no dimensions, your code seems fine. Rob -----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