Quantcast
Channel: Programming Forums
Viewing all articles
Browse latest Browse all 51036

Why is my Thread not giving me its name?

$
0
0
What gives? When I call my code below, I get and empty string. Is there no default name given to Threads in c#, or could this just be a mono thing, as I am using mono?

private void Event_Click (Object s, EventArgs a)
{
    Thread th = Thread.CurrentThread;	
    MessageBox.Show(th.Name);
}


Viewing all articles
Browse latest Browse all 51036

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>