Programming Tutorial On The Way

free online programming resource on dotnet, csharp, web related topics

In .NET, you can use the FileSystemWatcher to notify when a particular event occurs in the filesystem, such as the renaming of a particular file or directory, the increasing or decreasing of the size of a file, the user deleting a file or directory, the creation of a file or directory, or even the changing [...]

Popularity: 4% [?]

The WaitHandle.WaitOne method can indicate when an asynchronous operation times out. The code on the invoking thread needs to periodically wake up to do some work along with timing-out after a specific period of time. Use the approach shown in the following code, which will wake up every 20 milliseconds to do some processing. This [...]

Popularity: 4% [?]

While an asynchronous delegate is executing, you need to continuously poll it to see whether it has completed. This ability is useful when you need to monitor the length of time it takes the asynchronous delegate to execute or if you need to monitor other objects in the system in parallel with this asynchronous delegate, [...]

Popularity: 4% [?]

An exception thrown in a spawned worker thread will cause this thread to be silently terminated if the exception is unhandled. If an unhandled exception occurs in the main thread of an application, the main thread terminates, along with your entire application. An unhandled exception in a spawned worker thread, however, will terminate only that [...]

Popularity: 9% [?]

If you require more control over locking and unlocking of critical sections, you might want to try using the overloaded static Monitor.TryEnter methods. These methods allow more flexibility by introducing a timeout value. The lock keyword will attempt to acquire a lock on a critical section indefinitely. However, with the TryEnter method, you can enter [...]

Popularity: 5% [?]

When creating multithreading application, thread-safe access through accessor functions to an internal member variable is very important. Poorly written code may cause the application behave improperly, deadlock, etc. This article shows an example of on how to create a thread-safe access class. To achieve it, one way is the use the lock keyword to make [...]

Popularity: 17% [?]

This article is similar to the previous one Finding Members in an Assembly. This time, use the same technique as previouly, but filter out all types except interfaces. This article also makes use of the GetMember method of the System.Type class. The name may contain a * wildcard character at the end of the string [...]

Popularity: 2% [?]

The GetMember method of the System.Type class is useful for finding one or more methods within a type. This method returns an array of MemberInfo objects that describe any members that match the given parameters.
The * character may be used as a wildcard character only at the end of the name parameter string. In addition, [...]

Popularity: 2% [?]

« Previous Entries