this is my application to exclude streaming example, but the output is not as expected, does anyone know about this, please
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
namespace OTS_Performence_Test_tool
{
class Program
{
static void testThread(string xx)
{
int count = 0;
while (count < 5)
{
Console.WriteLine(xx );
count++;
}
}
static void Main(string[] args)
{
Console.WriteLine("Hello to the this test app ---");
for (int i = 1; i<=3; i++)
{
Thread thread = new Thread(() => testThread("" + i + "__"));
thread.Start();
}
Console.ReadKey();
}
}
}
but out but
3 __
3 __
3 __
3 __
3 __
3 __
3 __
3 __
3 __
3 __
4 __
4 __
4 __
4 __
4 __
what is happening can anyone explain please thanks
source
share