Get properties of current Thread : Thread Properties « Thread « VB.Net Tutorial

Home
VB.Net Tutorial
1.Language Basics
2.Data Type
3.Operator
4.Statements
5.Date Time
6.Class Module
7.Development
8.Collections
9.Generics
10.Attributes
11.Event
12.LINQ
13.Stream File
14.GUI
15.GUI Applications
16.Windows Presentation Foundation
17.2D Graphics
18.I18N Internationlization
19.Reflection
20.Regular Expressions
21.Security
22.Socket Network
23.Thread
24.Windows
25.XML
26.Database ADO.net
27.Design Patterns
VB.Net
VB.Net by API
VB.Net Tutorial » Thread » Thread Properties 
23.5.1.Get properties of current Thread
Imports System.Threading

Module Module1

    Sub Main()
        Dim objThread As Thread

        objThread = Thread.CurrentThread

        With objThread
            Console.WriteLine("Apartment State: {0}", .ApartmentState)
            Console.WriteLine("Current Context: {0}", .CurrentContext)
            Console.WriteLine("Current Culture: {0}", .CurrentCulture)
            Console.WriteLine("Current Principal: {0}", .CurrentPrincipal)
            Console.WriteLine("Current Thread: {0}", .CurrentThread)
            Console.WriteLine("Current UI Culture: {0}", .CurrentUICulture)
            Console.WriteLine("Is Alive: {0}", .IsAlive)
            Console.WriteLine("Is Background: {0}", .IsBackground)
            Console.WriteLine("Is Thread Pool Thread: {0}", .IsThreadPoolThread)
            Console.WriteLine("Name: {0}", .Name)
            Console.WriteLine("Priority: {0}", .Priority)
            Console.WriteLine("Thread State: {0}", .ThreadState)
        End With
    End Sub
End Module
Apartment State: STA
Current Context: ContextID: 0
Current Culture: en-CA
Current Principal: System.Security.Principal.GenericPrincipal
Current Thread: System.Threading.Thread
Current UI Culture: en-US
Is Alive: True
Is Background: False
Is Thread Pool Thread: False
Name:
Priority: Normal
Thread State: Running
23.5.Thread Properties
23.5.1.Get properties of current Thread
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.