protected string Active_Frozen(string text, string color)
{
connection();
string query = "SELECT CustomerInfo FROM ActiveSubscription WHERE UserName=@UserName";
SqlCommand cmd = new SqlCommand(query, conn);
if(query=="true")
{
text = "Active";
color = "Green";
}
else
{
text = "Frozen";
color= "Red";
}
return (text, color);
}
Run Code Online (Sandbox Code Playgroud)
我想要返回两个字符串:文本和颜色,不确定问题是什么.
错误@ return语句:
(参数)?文字/色彩
无法将lambda表达式转换为类型'string',因为它不是委托类型