TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
drew
NA
12
0
Passing Array Values between forms
Oct 31 2009 11:30 AM
I'm currently learning C# and i'm trying to pass array values between two forms, but I keep getting errors. Here is the code i'm trying to use:
*******FORM1 (JetBulls)********
string[] name = new string[15];
string[] myArray2;
myArray2 = Seats.passValuesMethod(myNewArray);
*******FORM2 (Seats)********
public string[] passValuesMethod(string[] myNamesArray)
{
string[] myNewArray = new string[15];
return myNewArray;
}
***
If i place "myArray2 = Seats.passValuesMethod(myNewArray);" outside of a method, i get invalid token errors
If i place it inside of a method, i get System.Windows.Forms.Form does not contain a definition for 'passValuesMethod' and it says the value i'm try to pass doesn't exist in the current context.
Any ideas what i'm doing wrong? Thanks.
Reply
Answers (
6
)
where keyword and COmparable
I cannot check all the ChildNodes in my ParentNode?