G
Guest
I need help/ example with this kind of probem:
public static Boolean Look (object sender, SqlConnection Con, string Table,
object[] Columns);
While calling this method, the Columns parameters will consist both value
types (ex: int) and reference types (textBox)
Ex :
string MyStr;
int k;
Look (sender, Conn, "MyTable", new object [] {textBox1, MyStr, k})
I want MyStr and k variables to be passed by reference (not by value) , but
when I define the method as:
public static Boolean Look (object sender, SqlConnection Con, string Table,
ref object[] Columns);
I got the error message:
cannot convert object [] to ref object[]
while calling the function.
Any help?
Thanks
public static Boolean Look (object sender, SqlConnection Con, string Table,
object[] Columns);
While calling this method, the Columns parameters will consist both value
types (ex: int) and reference types (textBox)
Ex :
string MyStr;
int k;
Look (sender, Conn, "MyTable", new object [] {textBox1, MyStr, k})
I want MyStr and k variables to be passed by reference (not by value) , but
when I define the method as:
public static Boolean Look (object sender, SqlConnection Con, string Table,
ref object[] Columns);
I got the error message:
cannot convert object [] to ref object[]
while calling the function.
Any help?
Thanks