Similar to Enter, but will never block, or will only block for a certain amount of time.
Version of TryEnter that will block, but only up to a timeout period.
[Visual Basic] Overloads Public Shared Function TryEnter(Object, TimeSpan) As Boolean
[C#] public static bool TryEnter(Object, TimeSpan);
[C++] public: static bool TryEnter(Object*, TimeSpan);
[JScript] public static function TryEnter(Object, TimeSpan) : Boolean;
Version of TryEnter that will block, but only up to a timeout period expressed in milliseconds.
[Visual Basic] Overloads Public Shared Function TryEnter(Object, Integer) As Boolean
[C#] public static bool TryEnter(Object, int);
[C++] public: static bool TryEnter(Object*, int);
[JScript] public static function TryEnter(Object, int) : Boolean;
Attempts to acquire the monitor lock without blocking.
[Visual Basic] Overloads Public Shared Function TryEnter(Object) As Boolean
[C#] public static bool TryEnter(Object);
[C++] public: static bool TryEnter(Object*);
[JScript] public static function TryEnter(Object) : Boolean;
Monitor Class | Monitor Members | System.Threading Namespace