Find All Data Providers Installed On A Machine

This post shows you how to find Data Providers installed on a machine. Data providers in .NET Framework provide the plumbing necessary to connect to databases. There are different data … Continue Reading →


Get Current Windows User In C#

This snippet will show you how to get the currently logged in user on windows.


Get Windows Registry Size With WMI And C#

Windows Registry Size can be retrieved using WMI objects. This code snippet shows you how to get current size and maximum size for Windows registry.

The output.


Reverse Array Elements Using C#

In .Net Framework reversing array elements can be done by using Reverse method on Array type. This code snippet shows you how this method can be used to reverse an … Continue Reading →


Convert Hexadecimal To Number In C#

To convert a Hexadecimal to a number we can use an overload of Convert.ToInt32 method. Using the overload I can convert for example hex string “BB” to a number.

Continue Reading →


Get Free Disk Space Using T-SQL

To get free disk space for all physical drives on a machine we can use xp_fixeddrives extended stored procedure. An interesting this about this procedure is that it is not … Continue Reading →


SQL Server 2008 – Get All Indexes In A Database

You’ve got to love sys views in SQL Server. While learning about performance tuning on SQL Server 2008 I wanted to get a list of all Indexes on my database … Continue Reading →


Get Name Of Current Executing Assembly In C#

This is where reflection comes in handy. The following code snippet shows you how to get the name of executing assembly.

Output for the above code returns the fully … Continue Reading →


Get CD Or DVD Drive Information Using WMI And C#

This snippet shows you how to get information about all CD / DVD drives on your machine using WMI and C#. To run the code you need to add reference … Continue Reading →


Get Last Row From Table Using LINQ To SQL

This query returns the last row from Sales.Customer table in Adventure Works database. I am using LINQPad to write and execute my query.

Here is the result as displayed … Continue Reading →


Page 1 of 212