If Then Else Stmt in C#
Can anyone help me to format this in C#?
Here is the code as I had it in VB:
cmd.ExecuteNonQuery()
if cmd.Parameters("ReturnValue").value = 0 then
lblStatus.text = "This Tool has been successfully added."
else
lblStatus.text = "Error! Please try agian"
end if
sqlConn.Close();
Thank you.
Tim
5 Answers
Know the answer? Post it. Somebody with the same question will find it here.

Christopher Reed4 reputationPosted May 11, 2004, 7:12 AM EDT
timothy.farrell175 reputationPosted May 11, 2004, 7:19 AM EDT
timothy.farrell175 reputationPosted May 11, 2004, 7:37 AM EDT
sjonesRank #7,001 · 251 reputationPosted May 11, 2004, 7:48 AM EDT
timothy.farrell175 reputationPosted May 11, 2004, 10:37 AM EDT