I'm trying to take a number in a textbox and use an if statement to do stuff with it (simple guessing game). At first I had an issue because it needed to be converted to an integer but I think I have moved past that problem. Now I get an error saying Operator
== can not be applied to operands of type method group or int. I understand where the int is coming from but where is the method group?
Can someone help me out with this?
Below is my C# code
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace WebApplication2
{
public partial class _Default : Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void guess (object sender, EventArgs e)
{
int number = 7;
int answer = Convert.ToInt32(input1.Text);
if (answer == number)
{
output.Tex ...
Go to the complete details ...