Recent Posts - page 10

  • Monitor File System via C# FileSystemWatcher

    Monitor File System - FileSystemWatcher Component Example

    C# FileSystemWatcher Component will track the changes in the file system. Simply we can create a decent looking Monitor File utility within one hour. The changes may be file creation, deletion, Modification and renaming. In this example, we will create an app that can spy on your file system based on the folder path that we mention. Whenever a change is found in the file system, the control gives a signal to the listening application through the FileSystemWatcher events.

  • Ranking Functions Examples – RANK, DENSE_RANK & Percentile

    SQL Dense Rank Example

    Ranking Functions are useful to provide ranking on the table columns based on the value stored in it. Say, for example, let us say a table is having students id and their Total Marks as separate columns. Now, it is meaningful if we apply the these function on the Total Marks column rather than Student ID column. With these Functions, we can easily find 2nd maximum, or 4th maximum marks. The Ranking Functions are available in SQL 2005 and later versions.

  • BackGroundWorker Component & Progress Bar of C#

    C# BackgroundWroker Component Example

    ‘BackgroundWorker Component’ is used to do long-running tasks in the background while the application runs in the foreground. When the background task is going on, the application can still look for the user events and replies to them. Generally when the application is busy doing a long-running task, users of the application cannot reach out with the UI items. This is because there is only one thread which is busy dealing with the long-running task.

    Here, we will create a sample that counts vowels of the textual content given in a text box. To make that as a long-running task, we will ask the execution to sleep for 50 milliseconds after processing a single character. Using this sample task, we will create our example and study the C# BackgroundWorker Component.

  • Web Config File and Tracing in ASP.Net

    Broken Link On Home Page

    Web configuration (Web Config) files are important for all the hosted websites. Every application requires settings that tells the application how it should behave. Also, it will be handy to use as all the settings go in one place and if somebody wants to change some settings, they know this one stop place. What if we don’t use these Web Config files?

    We should do it through the code. Now we will think of a situation of 100 settings for a website. If it is done in the code, anyone requires configuration change out of these 100, first need to search and pinpoint the piece of code that requires the changes. Then they should compile the binaries of the website and re-launch it. This requires a website maintenance window & during that time the website will be down. The ‘Web Config’ files avoid rebuilding the websites assemblies and keeps…

  • Playing Sound Via C# SoundPlayer & AxWindowsMediaPlayer

    Windows Media Player Active-X Control

    In this example, we will see how we can play sound files in C#. We can play Sound in two specific ways. One way of playing is using the SoundPlayer class from ‘System.Media’ Namespace and the other way is using the ‘Windows Media Player Active-X Control’ called AxWindowsMediaPlayer. In this article, we will try both the ways by playing a ‘.wav file’. You can test yourself for more functionality on the specific area