L
Looch
All,
I'm trying to output [Select * from Table1 where Column1 =
'FirstName'] but I can only get [Select * from Table1 where Column1 =
'" + name + "'"] (brackets for clarity) when using the code below.
How can I "break" into the query variable in the InsertName method to
add the name parameter to the variable query?
public class MyClass
{
private string query = "Select * from Table1 where Column1 = '" + name
+ "'"";
public void InsertName(string name)
{
Console.WriteLine(query);
}
static void Main (string[] args)
{
string variable = "FirstName";
InsertName(variable);
}
}
I'm trying to output [Select * from Table1 where Column1 =
'FirstName'] but I can only get [Select * from Table1 where Column1 =
'" + name + "'"] (brackets for clarity) when using the code below.
How can I "break" into the query variable in the InsertName method to
add the name parameter to the variable query?
public class MyClass
{
private string query = "Select * from Table1 where Column1 = '" + name
+ "'"";
public void InsertName(string name)
{
Console.WriteLine(query);
}
static void Main (string[] args)
{
string variable = "FirstName";
InsertName(variable);
}
}