G
garyusenet
Hello everyone.
I have a project at the moment which is working fine. I originally
coded my code in form1.cs, as this was the default code file generated
by Visual Studio. However now i'm trying to organise it better, so have
renamed the file to ChooseWindow and chose the autorename feauture, and
everything works fine.
I have just added a second form which will become my primary form
eventually, and I will call the original form (ChooseWindow) from this
new primary form. The problem i have is that the array list is setup in
the original form and I cant access it in the new form I have just
created. I need to be able to access this arraylist in both code files.
How do i declare it so that I can access it in both code files and not
just the original ChooseWindow code file?
Thanks very much,
Gary.
using System;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using SHDocVw;
namespace InternetExplorerInterface
{
public partial class Choosewindow : Form
{
public Choosewindow() // Pull up the form
{
InitializeComponent();
}
ArrayList ar = new ArrayList();
}
I have a project at the moment which is working fine. I originally
coded my code in form1.cs, as this was the default code file generated
by Visual Studio. However now i'm trying to organise it better, so have
renamed the file to ChooseWindow and chose the autorename feauture, and
everything works fine.
I have just added a second form which will become my primary form
eventually, and I will call the original form (ChooseWindow) from this
new primary form. The problem i have is that the array list is setup in
the original form and I cant access it in the new form I have just
created. I need to be able to access this arraylist in both code files.
How do i declare it so that I can access it in both code files and not
just the original ChooseWindow code file?
Thanks very much,
Gary.
using System;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using SHDocVw;
namespace InternetExplorerInterface
{
public partial class Choosewindow : Form
{
public Choosewindow() // Pull up the form
{
InitializeComponent();
}
ArrayList ar = new ArrayList();
}