|
Discover If Your Site Is Accessible From Different Cities
If you run a website then you assume the comfort that people from all over the world can browse your site. This may not be completely true. For example your site could be blocked or just not accessible from certain cities in the world. Just Ping is a service you can use to find out [...]
Microsoft Office 2010 Screenshots
After releasing Office 2007 SP2, Microsoft has unveiled screenshots for Office 2010. Like all previous versions Office 2010 will also introduce UI innovations but the most interesting thing about Office 2010 is that most Office Suite applications will also have a corresponding web application. In simple terms this means that we will be able to [...]
Windows 7 Control Panel In Classic Mode
What is the first thing you do when you open the control panel in Windows Vista? I always switch it to Classic View and most people I know do the same. Microsoft got it so right with the Classic View and I cannot understand whey they are trying to convince people to move away from [...]
Announcing vNext User Group
As developers we are always excited about latest technologies, and as a developer working in Microsoft eco-system there is no shortage of new tools and technologies. This is the driving point behind starting vNext User Group. The group aims to share knowledge about offerings from Microsoft which are in pipeline i.e they are to be [...]
SSMS Tools For SQL Server 2008
SSMS Tools Pack is a must have add-in for SQL Server Management Studio. It comes packed with a great set of features which as the author says on his site “…were missing from Management Studio”. Here is run down of three features I use most.
Text Format
If SSMS Tools Pack had only one feature and [...]
Outlook 2007 Hotfix
If you have been having issues with Outlook 2007 related to performance, erratic behaviour and just annoyance in general then this hotfix maybe what you need. Released in February 2007 the patch fixes many issues which can make working with Outlook 2007 a punishment. I installed it today morning and it’s been working fine and [...]
Capture XML In WCF Service
Working on a project where we wrote WCF Services a need was identified to capture the raw xml passed in to the service operation and also capture the reply xml sent back by the service. WCF does not provide such facility out of the box but it can be easily implemented using behaviours. In this [...]
Get Width And Height Of Image In C#
To get width and height of an image we can use System.Drawing.Image class. This code snippet shows how to retrieve width and height of an image.
string filePath = @"c:\deepak\MeeGo.jpg";
Image img = Image.FromFile(filePath);
Console.WriteLine(string.Format("Height: {0}",img.Size.Height));
Console.WriteLine(string.Format("Width: {0}",img.Size.Width));
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.
ManagementObjectSearcher mgmtObjects =
new ManagementObjectSearcher("Select * from Win32_Registry");
foreach (var item in mgmtObjects.Get())
{
Console.WriteLine(string.Format("Current Size: {0}MB", item["CurrentSize"]));
Console.WriteLine(string.Format("Maximum Size: {0}MB", item["MaximumSize"]));
}
The output.
5 Ways To Remove Conficker Worm
Conficker worm which strikes on April 1st is already being labelled as one of the most dangerous cyber attacks ever. The way this worm works is that it sets up what are known as botnets on computers around the world. The worm goes active on April 1st when it can be used by its creators [...]
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 array.
// Declare an array with 10 elements
int[] numbers = new int[] { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 };
// Output [...]
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.
int number = Convert.ToInt32("BB", 16);
And the number variable gets assigned value of 187.
Get Updates By Email
Popular Post
Tag Cloud
Code Snippets
- Get Current Windows User In C#
- Get Width And Height Of Image In C#
- Get Windows Registry Size With WMI And C#
- Reverse Array Elements Using C#
- Convert Hexadecimal To Number In C#
- Get Free Disk Space Using T-SQL
- SQL Server 2008 – Get All Indexes In A Database
- Get Name Of Current Executing Assembly In C#
- Get CD Or DVD Drive Information Using WMI And C#
- Get Last Row From Table Using LINQ To SQL

