Top community members
All Wiki Articles Create Wiki Article

Welcome to Dirask IT community! ❤ 💻
We are community that shares solutions with each other.

If you think you have something to add here.

you are welcome with your fresh ideas - List Articles

C#/.NET - create thread with parameters

0 contributions
4 points

To run new thread with parameters in C#/.NET Thread class and ParameterizedThreadStart delegate can be used.

Thread with parameters example

using System;
using System.Threading;

namespace Test
	class Program
		static void Main(string[] args)
			Thread thread = new Thread((object parameters) =>
			//Thread thread = new Thread(new ParameterizedThreadStart((object parameters) =>
				string text = (string)parameters;
				//MyType variable = (MyType)parameters;


			thread.Start("My parameter...");

			//MyType variable = new MyType();


My parameter...


  1. Thread Class - Microsoft Docs
  2. ParameterizedThreadStart Delegate - Microsoft Docs
0 contributions

Checkout latest Findings & News:

Checkout latest questions:

Checkout latest wiki articles:

Hey 👋
Would you like to know what we do?
  • Dirask is IT community, where we share coding knowledge and help each other to solve coding problems.
  • We welcome everyone,
    no matter what the experience,
    no matter how basic the question is,
    this community will help you.
Read more