Category Archives: C#

PHPHOST BLOG

Web Hosting Related Articles You May Need

Early June 2011 Software Development Posts of Interest

This post summarizes some blog posts that I have found very interesting in the past week (posts may be older than this, but I saw them in the past week). The topics covered are fairly diverse.

Learning Groovy

I like Vasanth Dharmaraj’s post Learning… Continue reading

Posted in Android, C#, General Development, Groovy, PHP, Syndicated | Leave a comment

List<T>.ConvertAll<>() with Lambda Expression

List<T> has many useful methods for dealing with sequences and collections. One such method is the ConvertAll<>() method. All those who have used the List<T>.ConvertAll<>() are aware how useful this method is to convert the curr… Continue reading

Posted in C#, LINQ, Syndicated | Leave a comment

List<T>.ConvertAll<>() with Lambda Expression

List<T> has many useful methods for dealing with sequences and collections. One such method is the ConvertAll<>() method. All those who have used the List<T>.ConvertAll<>() are aware how useful this method is to convert the curr… Continue reading

Posted in C#, LINQ, Syndicated | Leave a comment

Remove all Lower Case Letters using C#

I came across a discussion where the OP wanted to use only the first letter of a word in a string. The first letter of each word was capitalized, so his requirement was to abbreviate the sentence by removing all lower case letters in a string.
For exam… Continue reading

Posted in C#, Syndicated, VB.NET | Leave a comment

Remove all Lower Case Letters using C#

I came across a discussion where the OP wanted to use only the first letter of a word in a string. The first letter of each word was capitalized, so his requirement was to abbreviate the sentence by removing all lower case letters in a string.
For exam… Continue reading

Posted in C#, Syndicated, VB.NET | Leave a comment

.NET – Start Asynchronous Parallel Task and Cancel Them Too

I was having a good discussion with a couple of friends about the support of parallel tasks in .NET. If you too are interested in the same, I have written a couple of articles that can give you an overview of the support for parallelism and concurrency… Continue reading

Posted in .NET, C#, Syndicated | Leave a comment

.NET – Start Asynchronous Parallel Task and Cancel Them Too

I was having a good discussion with a couple of friends about the support of parallel tasks in .NET. If you too are interested in the same, I have written a couple of articles that can give you an overview of the support for parallelism and concurrency… Continue reading

Posted in .NET, C#, Syndicated | Leave a comment

Loop Multiple Arrays in C# – Short way

Let us see a trick to loop multiple arrays in C#. Consider the following program:static void Main(string[] args){ var arr1 = new[] { 5, 3, 4, 2, 6, 7 }; var arr2 = new[] { 4, 9, 3, 1, 9, 4 }; var arr3 = new[] { 2, 1, 8, 7, 4, 9 }; foreach (… Continue reading

Posted in C#, LINQ, Syndicated | Leave a comment

Use Anonymous Method with a Delegate in C#

A colleague of mine asked me a question – ‘How can we use an Anonymous method with a Delegate and when should we do it”.By using anonymous methods, you reduce the coding overhead in instantiating delegates, by eliminating the need to create a separ… Continue reading

Posted in C#, Syndicated, VB.NET | Leave a comment

Determine if your Laptop is Running on battery using C# or VB.NET

Here’s some code to programmatically find out if your laptop is currently running on battery power. I have created a Windows Form application and added the following code on a button click event which uses the SystemInformation.PowerStatus propertyC#… Continue reading

Posted in C#, Syndicated, VB.NET | Leave a comment