We need a class that has only one instance, and we need to provide a global point of access to the instance. We may also want to make sure that our solution is thread safe.
Many times we need to know executable path of Application and some time we need to know the path of assembly which is loaded. There are many options to get the location but not all are good as we think.
Regular expressions provide a powerful, flexible, and efficient method for processing text. The extensive pattern-matching notation of regular expressions enables you to quickly parse large amounts of text to find specific character patterns; to validate text to ensure that it matches a predefined pattern (such as an email address); to extract, edit, replace, or delete text substrings; and to add the extracted strings to a collection in order to generate a report. For many applications that deal with strings or that parse large blocks of text, regular expressions are an indispensable tool.
How can we detect when a System.Windows.Forms.WebBrowser control has done page done ?. What about Navigate and DocumentCompleted events of control but these events fire multiple times so what to do ????? Here is a solution !
In .NET Framework 4, the Task Parallel Library provides a new model for asynchronous and parallel programming and .NET 4.5 introduced the async and await keywords, simplifying asynchronous programming as much as possible. But for .Net 3.5 we have Delegates enable you to call a synchronous method in an asynchronous manner.