If I have a background thread and having Join to wait for completing background thread then does it mean it will work like same as foreground thread, if not then what is the difference.
Thread worker = new Thread(() => Console.ReadLine());
worker.IsBackground = true ;
worker.Start();
worker.Join();
Can I say above code will work like a foreground thread.
It depends what you mean by “work like a foreground thread”. The thread is still separate from the main thread – for example it can’t do GUI work in a Forms app – but your main thread will pause at Join until the background thread completes.