Remove Whitespace from C# Strings

37 Comments »

You probably knew that you can use the String.Trim method to remove whitespace from the start and end of a C# string.  Unfortunately, the Trim method does not remove whitespace from the middle of a string.

Read the rest of this entry »

KeyedCollection: Dictionary for Values with Embedded Keys

2 Comments »

If you need a collection of objects accessed by a key, and the key is one of the object’s properties, then you should use the KeyedCollection class instead of Dictionary. For example, you would use a KeyedCollection to store Employee objects accessed by the employee’s ID property.

Read the rest of this entry »

Best C# Web Sites

24 Comments »

Recently I posted a list of the Best C# Blogs. Today we recognize the best C# Web sites.

Following (in alphabetical order) are the best C# sites active on the Web today. Also included is the “About” section of the site (edited for space and clarity). Please comment if you can recommend other excellent C# web sites that didn’t make my list.

Read the rest of this entry »

Best C# Blogs

42 Comments »

What makes a C# blog good? Pretty much the same thing that makes any blog good, but with a focus on C#, of course. Good C# blogs have:

  • Useful news, information, tips and code samples
  • Regular updates
  • Original content, not a splog or news feed
  • Good organization, including categories and tags
  • Healthy discussion and user comments
  • Personal insight and humor, but not too much personal drivel

Read the rest of this entry »

« go back