"Error 1 Only assignment, call, increment, decrement, and new object expressions can be used as a statement Line 23 17"
"Error 2 Only assignment, call, increment, decrement, and new object expressions can be used as a statement Line 27 17"
Code:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace WindowsFormsApplication9
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
if (timer1.Enabled == false)
{
timer1.Enabled == true;
}
else
{
timer1.Enabled == false;
}
}
}
}
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace WindowsFormsApplication9
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
if (timer1.Enabled == false)
{
timer1.Enabled == true;
}
else
{
timer1.Enabled == false;
}
}
}
}