i am a beginner to C# i am trying to type some code for threading, and now i came across this error:"
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;
using System.Threading;
namespace Thread_test
{
public partial class Form1 : Form
{
Thread process = new Thread(new ThreadStart(task));
public void task()
{
int a = 0;
for (; ; )
{
a = a + 1;
textBox1.Text = Convert.ToString(a);
}
}
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
}
private void button1_Click(object sender, EventArgs e)
{
process.Start();
}
}
}