Advertisement
OKIEWARDOYO

C# No.42 2

Jun 30th, 2014
2,642
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.71 KB | None | 0 0
  1. using System;
  2. using System.Threading;
  3. namespace MembuatThread
  4. {
  5.     class Program
  6.     {
  7.         static void Main(string[] args)
  8.         {
  9.             Console.WriteLine("****Current Thread Informations***");
  10.             Thread T = Thread.CurrentThread;
  11.             T.Name = "MeTu+ Thread";
  12.  
  13.             Console.WriteLine("Thread Name: {0}", T.Name);
  14.             Console.WriteLine("Thread Status: {0}", T.IsAlive);
  15.             Console.WriteLine("Priority: {0}", T.Priority);
  16.             Console.WriteLine("Context ID: {0}", Thread.CurrentContext.ContextID);
  17.             Console.WriteLine("Current application domain: {0}", Thread.GetDomain().FriendlyName);
  18.  
  19.             Console.ReadLine();
  20.         }
  21.     }
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement