using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace Simba254
{
public partial class Form1 : Form
{
private Thread thread;
public delegate void InvokeDelegate();
public Form1()
{
InitializeComponent();
thread = new Thread(threadMethod);
}
private void threadMethod()
{
int i = 0;
while (i < 100)
{
Thread.Sleep(500);
BeginInvoke(new InvokeDelegate(JoinGuIThread));
}
//Write code here simba25
}
private void JoinGuIThread()
{
//write code here simba 254
this.label1.Text = DateTime.Now.ToString("dd MMM yyyy HH:mm:ss");
}
private void Startthread()
{
//write code here simba 254
thread.Start();
}
private void Form1_Load(object sender, EventArgs e)
{
Startthread();
}
}
}