.Net
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
Go Back   Web Development Archives Mailing Lists .Net

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Web Development Archives Sponsor:
  #1  
Old June 22nd, 2008, 12:00 AM
Chris Anderson
Guest
Dev Archives Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
Arrays as parameters

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




class Someclass{
private string[] myarray;

public string[] MyArray {
get {
return myarray;
}
set{
myarray= value;
}
}
}

Reply With Quote
Reply

Viewing: Web Development Archives Mailing Lists .Net > Arrays as parameters


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway