There are quite a lot of instance where you need to do a primary sort and you need a secondary sort on the same collection and sometimes even multiple sort. With LINQ we can achieve it pretty straight forward. Let us assume the situation here. We have a list of employees and we need the output to be sorted […]
Unleashing ASP.net Calendar Control
Download Sample CalendarDemo.zip (171.18 kb) Introduction Calendar control is as important as a normal text box control in any application. Most of any application which needs data entry will definitely need a calendar control at some part. ASP.net has a very good calendar control which we often ignore without exploring how far it can be […]
Getting Added And Deleted Items In A List Using LINQ
Most the time when we work with a list object, finding a newly added items or deleted items becomes a very trivial part of the logic. Sometimes, we endup writing sophisticated logic or loops to get this done. Below code will demonstrate how this can be easily done using LINQ. Lets assume that we have […]
Guide: Write Your Own Syntax Highlighter
Download (80.22 kb) your sample here Syntax Highlighter has become the trivial part of every programmers life. Since “Oxford English Dictionary” which was published in the year 1985, we are addicted to these editors. In this post, I will walk you through a very simple and basic syntax highlighter application. Our first goal is define […]
Search Multiple Strings Using Regular Expression
This is small piece of code snippet which I wanted to share as we face this necessity in our day to day programming. Suppose you have a need when you need to search multiple string, say you need to search strings like “int”, “float”, “string” in a piece of text. Below is how you will […]
Workaround For Non Serializable Types
There are many a situations you would have come across when you want to XML serialize an object but since the type is a non – serializable you can’t do it, and you could have done a lot of code for getting the functionality done. There is a much simpler and easy way to get […]
Azure Tutorial; Be in cloud (Part 5) [Storage Account – Introduction]
Windows Azure – Storage Now that we have already completed the part of compute, we will now dive into another bigger advantage of the Azure; the storage. This shouldn’t be confused with the hosting space provided by many hosting vendors. Unlike the hosting space, or disk space provided by most of the vendors, this is […]
Ping remote machines using .net
If you are looking for to ping a remote machine and you want to record the state along with status and return time, below example can help you. private void Ping_Click(object sender, EventArgs e) { List domains = new List(); domains.Add(“www.bing.com”); domains.Add(“www.yahoo.com”); domains.Add(“jebarson.info”); foreach (string domain in domains) { Ping pinger = new Ping(); […]
Recovering your application from unhandled exception in .net
Exception handling is one of the nightmare and the best practice for any programmer. But doesn’t matter how good the programmer is, there will be always a chance of unhandled exception daunting the users. .net 2.0+ however has a better option of handling it which is focused on recovering your application on the next start. […]