public string MessageItem (string ItemName)
{
get { return dsMessageContents.Tables["input"].Rows[0].ToString();}
}
I am getting 2 errors:
You're combining a method and a property into something that... won't work. :)
Use a method:
public string MessageItem(string ItemName)
{
return dsMessageContents.Tables["input"].Rows[0].ToString();
}
Or a property:
public string MessageItem
{
get { return dsMessageContents.Tables["input"].Rows[0].ToString(); }
}
Read up on the differences here.
This also happens if you use double ==
instead of single =
.
string test;
test == "hello";
to
string test;
test = "hello";
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With