P
Patrick Olurotimi Ige
When i convert:- this code from VB to C#
Why do i get error "Cannot implicitly convert type 'object' to 'bool'
VB
---
If cmdcommand.Parameters("ReturnValue").Value = 1 Then
lblStatus.Text = "Username already exists!"
Else
lblStatus.Text = "Success!"
End If
to
C#
---
if (cmdcommand.Parameters["ReturnValue"].Value == 1) {
lblStatus.Text = "Username already exists!";
} else {
lblStatus.Text = "Success!";
}
Why do i get error "Cannot implicitly convert type 'object' to 'bool'
VB
---
If cmdcommand.Parameters("ReturnValue").Value = 1 Then
lblStatus.Text = "Username already exists!"
Else
lblStatus.Text = "Success!"
End If
to
C#
---
if (cmdcommand.Parameters["ReturnValue"].Value == 1) {
lblStatus.Text = "Username already exists!";
} else {
lblStatus.Text = "Success!";
}