这是我用C#编写的代码段.Mobile并且Name是我表中的列.问题是我的查询格式有问题.如果我们想使用OR在C#中连接两个查询,语法是否正确?
SqlDataAdapter da = new SqlDataAdapter("SELECT * FROM [Contact Management] WHERE
Mobile='"+Convert.ToInt32(txtSearch.Text)+"' OR Name='"+txtSearch.Text+"'",con);
Run Code Online (Sandbox Code Playgroud) 为什么给定200的输出而不是我预期的20000?
请帮我这个!!!
class Program
{
static void Main(string[] args)
{
mukul x = new mukul();
x.b= 200;
Console.WriteLine(Convert.ToString(x.calculate));
Console.ReadLine()
}
}
class mukul
{
public int b;
public int calculate
{
get { return b; }
set { b = value * 100; }
}
}
Run Code Online (Sandbox Code Playgroud)