All pastes #510762 Raw Edit

Mine

public text v1 · immutable
·published 2007-05-26 01:37 UTC
rendered paste body
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Threading;

namespace WindowsApplication1
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }
        int counterVariable = 0;
        public void startButton1_Click(object sender, EventArgs e)
        {
            blah.Start();
        }
        public delegate void ThreadStart();
        ThreadStart myDelegate = new ThreadStart(updateCounter);
        Thread blah = new Thread(new ThreadStart(updateCounter));
        public static void updateCounter()
        {
            counterVariable++;
            counterLabel1.Text = counterVariable.ToString();
        }

        public void stopButton1_Click(object sender, EventArgs e)
        {
            blah.Suspend();
        }
        
    }
}