C# noob.
Ok, here's what I'm trying to do ...
I have a dbUtilities class I've made. And its my desire to have methods in it like "FillListBoxFromDB" .... I want to pass the listBox that will be the target, and the sql query command.
I will have multiple places I want to fill listboxes, combo boxes, etc ... so I just want to create one generic utility method I can call.
I tried:
public void FillListBoxFromDB(ByRef listBox AS lb, string sqlCommand)
But that generates 9 build errors concerning tokens and arrays.
I changed it to:
public void FillListBoxFromDB(listBox ls, string sqlCommand)
and I get only one error:
error CS0246: The type or namespace name 'listBox' could not be found (are you missing a using directive or an assembly reference?)
Even though I have using System.Windows.Forms;
Any help would be appreciated. :)