“What’s the best programming language?” is a very common argument between developers that can go back forever. Each claim his/her programming language performs the best. For example, even though Java and C# have a lot in common; both are object-oriented languages, both are compiled to an intermediate language then interpreted with a just in time …
c#
USB Port Insert/Remove detection – Source Code
This post contains only a simple console application source code in C# about how to detect the insertion or removal of any USB device, for more details on the code, please read USB Port Insert / Remove detection using WMI.
USB Port Insert/Remove detection
Almost all modern peripheral devices use the USB port as an interface to connect to the pc. USB Port Insert/Remove detection is made easy in Windows using WMI. This post will show how to detect insertion or removal of a device in a USB port. I will use the Windows Management Instrumentation (WMI), which is …
Using Unsafe code in C#
Since I’m working on my graduation project ( Iris recognition system ) using C#, I got involved in building the basic methods of image processing, such as image enhancement, convert to gray, convolutions, edge detectors using Unsafe code in C# I have to reach every single pixel of the Bitmap image. Still, when dealing with …
Convert an image to grayscale
This post explains the basics of pixels and colors, and how to use a simple formula to convert an image to grayscale in C#. An image in a computer consists of three primary color channels; they are RED, GREEN, and BLUE. So each pixel in an image has three values, one for each channel ranging …
Windows Service Email Scheduler
Hi, This post is a solution for a question that I saw on ASP.NET forums about automating sending emails at specific dates. This post demonstrates how to create and use a Windows Service Email Scheduler. The original question is as follows: Word files with names of particular dates are stored in a folder at webserver(i.e., …
Create thumbnail for an image with the same scale
Hi, after you upload an image to the server you need to scale it or manipulate it according to your business needs. In this post, I’ll show how to create a thumbnail of an image with the same scale as the original image with C#.
Uploading files in ASP.NET
In this post, I’ll demonstrate uploading files in ASP.NET to a server directory and discuss several used techniques step by step. In ASP.NET, files can be uploaded many ways. One way is to use the FileUpload control because it’s easy and ready to use. Some issues should be considered: 1. The types of the file to be …