Consider:
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);
}
I want to return both strings: text and color, but I am not sure what the problem is.
Error @ return statement:
(parameter) ? text/color
Cannot convert lambda expression to type 'string' because it is not a delegate type