Topic Path: Symbol Reference > Classes > TCriticalSection Class > TCriticalSection Methods > TryEnter Method
ContentsIndexHome
PreviousUpNext
TCriticalSection.TryEnter Method

Attempts to start resource protection for the critical section.

function TryEnter: Boolean;

Boolean - True on success.

TryEnter is a Boolean function that attempts to start resource protection for the critical section on the .Net platform. 

TryEnter calls the System.Threading.Monitor.TryEnter method in the FCL using the current object instance as an argument. 

TryEnter returns True if resource protection was successfully initiated for the current object instance. 

Use Release or Leave to stop resource protection for the critical section.

Copyright 1993-2006, Chad Z. Hower (aka Kudzu) and the Indy Pit Crew. All rights reserved.
Post feedback to the Indy Docs Newsgroup.