Click here to Skip to main content
15,893,588 members
Home / Discussions / C#
   

C#

 
GeneralRe: classes programing Pin
snouto14-May-05 7:45
snouto14-May-05 7:45 
GeneralC# Interop with C++ classes Pin
Julien Delezenne13-May-05 17:20
Julien Delezenne13-May-05 17:20 
GeneralReference 64bit COM Object from C# Pin
Phan Chau13-May-05 11:39
Phan Chau13-May-05 11:39 
Generalnewbie question Pin
Tom Wright13-May-05 10:58
Tom Wright13-May-05 10:58 
GeneralRe: newbie question Pin
Tom Wright13-May-05 11:44
Tom Wright13-May-05 11:44 
GeneralRe: newbie question Pin
Kevin McFarlane13-May-05 12:02
Kevin McFarlane13-May-05 12:02 
GeneralRe: newbie question Pin
Utku KAYA13-May-05 12:33
Utku KAYA13-May-05 12:33 
GeneralRe: newbie question Pin
Tom Wright14-May-05 7:17
Tom Wright14-May-05 7:17 
I'm not sure what you mean by this,
Utku KAYA wrote:
'instanceNameHere.GetNics()'

Here is my code:

		static void Main() <br />
		{<br />
			Application.Run(new Form1());<br />
			MyNetwork.LoadNics();	<br />
<br />
		}<br />
<br />
		private void Form1_Load(object sender, System.EventArgs e)<br />
		{<br />
			LoadNics();<br />
		}<br />
<br />
		private void LoadNics()<br />
		{<br />
			ArrayList nicName = WMIHelper.GetNics();<br />
<br />
			NICScb.Items.Clear();<br />
			foreach ( String name in nicName)<br />
			{<br />
				NICScb.Items.Add(name);<br />
			}<br />
			if (NICScb.Items.Count > 0)<br />
			{<br />
				NICScb.SelectedIndex = 0;<br />
			}<br />
<br />
		}<br />
		<br />
	}<br />


I still get an error in the main function. I read that the main function does not belong to the object, so I see what you mean by referencing the instance. But it still errors out. Can you explain some more for me?

Thanks


Tom Wright
tawright915@yahoo.com
GeneralRe: newbie question Pin
Polis Pilavas14-May-05 8:21
Polis Pilavas14-May-05 8:21 
GeneralRe: newbie question Pin
leppie14-May-05 11:02
leppie14-May-05 11:02 
GeneralRe: newbie question Pin
Tom Wright16-May-05 4:56
Tom Wright16-May-05 4:56 
GeneralOn Use Connection or DataSet Pin
yahyacis13-May-05 8:43
yahyacis13-May-05 8:43 
GeneralRe: On Use Connection or DataSet Pin
MoustafaS13-May-05 9:10
MoustafaS13-May-05 9:10 
Generalmultiple forms problems in C# Pin
13-May-05 8:30
suss13-May-05 8:30 
GeneralRe: multiple forms problems in C# Pin
Dave Kreskowiak13-May-05 8:48
mveDave Kreskowiak13-May-05 8:48 
GeneralRe: multiple forms problems in C# Pin
13-May-05 9:40
suss13-May-05 9:40 
GeneralRe: multiple forms problems in C# Pin
Anonymous13-May-05 10:24
Anonymous13-May-05 10:24 
GeneralValidating Pin
edokt13-May-05 7:53
edokt13-May-05 7:53 
GeneralRe: Validating Pin
Dave Kreskowiak13-May-05 8:45
mveDave Kreskowiak13-May-05 8:45 
GeneralRe: Validating Pin
edokt13-May-05 12:40
edokt13-May-05 12:40 
GeneralRe: Validating Pin
Andy Moore13-May-05 11:19
Andy Moore13-May-05 11:19 
GeneralRe: Validating Pin
edokt13-May-05 12:35
edokt13-May-05 12:35 
GeneralDetermine GUID for Office Products. Pin
stan2813-May-05 6:32
stan2813-May-05 6:32 
GeneralRe: Determine GUID for Office Products. Pin
S. Senthil Kumar13-May-05 7:40
S. Senthil Kumar13-May-05 7:40 
Generalc# email problem Pin
Member 177938613-May-05 4:08
Member 177938613-May-05 4:08 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.