Click here to Skip to main content
15,946,342 members
This competition has ended

Best C# article of July 2011

Contribute to CodeProject and you'll automatically be in the running for a monthly prize!

Each month at CodeProject we gather together the best of the articles submitted the previous month and ask our readers to choose the best of the best. Entry is automatic - just submit you articke and we'll do the rest.

Check out the submission guidelines for information on posting articles.

Current Entries

Articles that match the contest criteria are automatically entered. The top 50 entries are shown.

Please Sign up or sign in to vote.
9 Jul 2011Paulo Zemek
The easiest singleton pattern is the one you used to the lock object itself.Creating any variable as static readonly and initializing it directly (or via a static constructor) will already make it singleton.Also, considering that "lock" clears all the caches, you don't need to declare the...
Please Sign up or sign in to vote.
25 Jul 2011Praveen Kullu
An Attribute changer which can change attributes of files and folders
Please Sign up or sign in to vote.
26 Jul 2011Arjan van Dijk
Developing a small generic re-usable model using the highly flexible DC technology resulting in a fully functional mini-application
Please Sign up or sign in to vote.
8 Jul 2011Clifford Nelson
A special class is needed to support binding a set of flags to a View.
Please Sign up or sign in to vote.
20 Jul 2011Gil Fink
The post shows how to use the Geocode API in order to make an address lookup for a given location.
Please Sign up or sign in to vote.
12 Jul 2011RaisKazi
Walkthrough of Asp.Net Core Ajax
Please Sign up or sign in to vote.
3 Dec 2013Vangos Pterneas
How to create a WPF application performimg skeleton tracking.
Please Sign up or sign in to vote.
4 Jul 2011Nelson Kosta Souto
How to use key pressing on a form
Please Sign up or sign in to vote.
16 Jul 2011tsdragon
Application[“P...
Please Sign up or sign in to vote.
20 Jul 2011cmschick
Thanks for sharing. I have a similar utility with additional capabilities that some of you might find useful.using Microsoft.VisualBasic;using System;using System.Collections;using System.Collections.Generic;using System.Data;using System.Diagnostics;using...
Please Sign up or sign in to vote.
6 Jul 2011Brian C Hart
This tip shows how to add support for New Horizontal Tab Group and New Vertical Tab Group commands to the Window menu of an application using the DockPanel Suite by Weifen Luo, and some other minor improvements to help decided if at least one of your windows is docked to the side of the main form an
Please Sign up or sign in to vote.
10 Jul 2011Mohammad A Rahman
Parse key/value of a Generic dictionary in C#.
Please Sign up or sign in to vote.
27 Jul 2011Ivan Krivyakov
BackgroundWorker and UI threads
Please Sign up or sign in to vote.
21 Jul 2011Ramanujam Shankar
Remove the triangle and star symbol from the row header in a DataGridView.
Please Sign up or sign in to vote.
23 Jul 2011#realJSOP
I wouldn't create a class for this. I'd make it an extension method, and then do this:public static class String Extensions{ public static string Reverse(this string value) { value = // do your reverse code here; return value; }}// Usage:string x...
Please Sign up or sign in to vote.
4 Jul 2011DrABELL
AsFYI: In addition to my previous comments, here is the link to an excellent article published by Aron Weiler on CodeProject addressing the same issue of Multi-Key Dictionary Object: C# Multi-key Generic Dictionary[^]
Please Sign up or sign in to vote.
5 Jul 2011#realJSOP
I do it this way:0) Create a base page class, and store the current page's url (you can do this any number of ways, so I'll leave it to your imagination):public class MyBasepage : System.Web.UI.Page{ public string CurrentUrl { get; set; } }1) Store the page's Url to a...
Please Sign up or sign in to vote.
7 Jul 2011#realJSOP
.Net 4 has the enum.HasFlag() method, which kinda obsoletes this tip. :)
Please Sign up or sign in to vote.
12 Jul 2011johannesnestler
I think your function is no (theoretical) replacement for the is operator.The is operator takes an object (left) and a type (right) as arguments, not two objects.The is operator considers inheritance. Look at this (executable) example:using System;namespace IsOperatorCheck{ ...
Please Sign up or sign in to vote.
15 Jul 2011Simon Bridge
Full code listing for a very simple but effective Colour-Combo (Color for those in America)
Please Sign up or sign in to vote.
19 Jul 2011Colin Eberhardt
How to create a conversation view, mimicking the SMS messaging interface within Windows Phone 7
Please Sign up or sign in to vote.
22 Jul 2011Brij
Generics and Constraints over Generics
Please Sign up or sign in to vote.
21 Jul 2011Gediminas Geigalas
Teleric MVC Grid ActionLink Column
Please Sign up or sign in to vote.
27 Jul 2011garymcleanhall
Towards better unit testing organization
Please Sign up or sign in to vote.
27 Jul 2011PeteBarber
Unit Testing C# Custom Attributes with NUnit
Please Sign up or sign in to vote.
27 Jul 2011PeteBarber
Unit Testing C# Custom Attributes with NUnit
Please Sign up or sign in to vote.
27 Jul 2011Qwertie
I want a conditional dot operator
Please Sign up or sign in to vote.
29 Jul 2011gsvolt
Draing a two-color line in Silverlight.
Please Sign up or sign in to vote.
1 Jul 2011Mahadesh Mahalingappa
In Part 2 of Dynamic Loading of objects, I have created a custom Dependency Injection Framework
Please Sign up or sign in to vote.
3 Jul 2011Dr.Walt Fair, PE
You can also use the method in the following article to insert any sort of binary file in your project resources and retrieve it. Create a blank Jet database[^]
Please Sign up or sign in to vote.
10 Jul 2011GAMerritt
Getting a DllImport of kernel32's GetFullPathName to work (C#).
Please Sign up or sign in to vote.
10 Jul 2011Chris Randle
I've always used var because ReSharper suggested it by default. However, like most people, I only did this when I didn't understand the conotations of ReSharper's suggestion. Now I disable this suggestion in the plug-in, and in actual fact, I prefer to use the fully qualified name on at least...
Please Sign up or sign in to vote.
15 Jul 2011Manoj Kumar Kota
Fetch Data from Google Analytics Service
Please Sign up or sign in to vote.
17 Jul 2011Philippe Mori
LINQPad is an interesting tool to try queries.LINQPad[^]Perfect tool to try out some alternatives for complex queries. As we can see generated queries and elapsed time, it help a lot to help having fast queries for complex requests.
Please Sign up or sign in to vote.
18 Jul 2011AspDotNetDev
If you are the type that likes to debug production code, you can use SQL Profiler to find queries generated by your LINQ statements. This is a technique I recently used because it was so simple and did not require me to recompile anything.Note that StefanHam already posted this alternate...
Please Sign up or sign in to vote.
20 Jul 2011Gil Fink
What Model Binders are in ASP.NET MVC and how you can use them in your MVC applications.
Please Sign up or sign in to vote.
21 Jul 2011Raymund Macaalay
How to get the default record type of a user for event creation in Salesforce
Please Sign up or sign in to vote.
23 Jul 2011Prerak Patel
What is new in this age old method? We can use LINQ too.Dim inputString As String = "Reverse me"Dim input() As Char = inputString.ToCharArrayDim result As String = New String((From i As Integer In Enumerable.Range(1, input.Length) _ Select...
Please Sign up or sign in to vote.
24 Jul 2011GAMerritt
A C# method for finding ratio Q/R approximating real numbers.
Please Sign up or sign in to vote.
25 Jul 2011PeteBarber
A simple generic way to test Custom Attributes with NUnit.
Please Sign up or sign in to vote.
25 Jul 2011garymcleanhall
Skyhooks are undesirable, how to replace them in your code.
Please Sign up or sign in to vote.
26 Jul 2011#realJSOP
One way to effectively zero the columns any DataRow object.
Please Sign up or sign in to vote.
29 Jul 2011Bob Sandberg
How would you do this, if objects included inside one of the serialized objects was an abstract class? E.g.:abstract class Base{ public int x;}class A : Base{ public int y;}class B : A{ public int z;}class SomeOtherClass{ public string...
Please Sign up or sign in to vote.
1 Jul 2011zenwalker1985
This article explains a refactored code snippet on passing parameters for a stored proecedure via SP schema rather than hard coding the column/param names.
Please Sign up or sign in to vote.
4 Jul 2011charles henington
[Serializable]...
Please Sign up or sign in to vote.
9 Jul 2011charles henington
Sending Email with Custom Control
Please Sign up or sign in to vote.
8 Jul 2011Amey1202
In WPF, just set the ToolPanelView property of CrystalReportViewer to None. That is enough.
Please Sign up or sign in to vote.
12 Jul 2011Paul Schwartzberg
Formatting XML in a string for visual presentation.
Please Sign up or sign in to vote.
16 Jul 2011Waleed Eissa
How to turn URLs into hyperlinks in ASP.NET and truncate long URLs in the link text
21 Jul 2011Redgate Software
Discover how Automated Error Reporting can let your users notify you instantly when they encounter a bug, and give you all the information you need to reproduce and fix the problem.

Current Participants

Those with articles that match the contest criteria are automatically entered.

Software Developer (Senior) Paddedwall Software
United States United States
I've been paid as a programmer since 1982 with experience in Pascal, and C++ (both self-taught), and began writing Windows programs in 1991 using Visual C++ and MFC. In the 2nd half of 2007, I started writing C# Windows Forms and ASP.Net applications, and have since done WPF, Silverlight, WCF, web services, and Windows services.

My weakest point is that my moments of clarity are too brief to hold a meaningful conversation that requires more than 30 seconds to complete. Thankfully, grunts of agreement are all that is required to conduct most discussions without committing to any particular belief system.
United States United States
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.
Software Developer (Senior) Distel Software B.V.
Netherlands Netherlands
Senior Developer and Technical Director at Distel Software B.V.(www.distel.nl)

About 15 years of IT experience in several languages (c++, c#, vb.net) specializing in framework oriented development
(using DC, DO and XAF/XPO) based on C# where the focus is on functional modeling and creating re-usable building blocks.
Web Developer
United States United States

  • Managing Your JavaScript Library in ASP.NET (if you work with ASP.net and you don't read that, you are dead to me).
  • Graduated summa cum laude with a BS in Computer Science.
  • Wrote some articles and some tips.
  • DDR ("New high score? What does that mean? Did I break it?"), ping pong, and volleyball enthusiast.
  • Software I have donated to (you should too):
Web Developer
United States United States
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.
Architect
United States United States
Dr. Brian Hart obtained his Ph.D. in Astrophysics from the University of California, Irvine, in 2008. Under Professor David Buote, Dr. Hart researched the structure and evolution of the universe. Dr. Hart is an Astrodynamicist / Space Data Scientist with Point Solutions Group in Colorado Springs, CO, supporting Space Operations Command, United States Space Force. Dr. Hart is a Veteran of the U.S. Army and the U.S. Navy, having most recently served at Fort George G. Meade, MD, as a Naval Officer with a Cyber Warfare Engineer designator. Dr. Hart has previously held positions at Jacobs Engineering supporting Cheyenne Mountain/Space Force supporting tests, with USSPACECOM/J58 supporting operators using predictive AI/ML with Rhombus Power, and with SAIC supporting the Horizon 2 program at STARCOM. Dr. Hart is well known to the community for his over 150 technical publications and public speaking events. Originally from Minneapolis/Saint Paul, Minnesota, Dr. Hart lives in Colorado Springs with his Black Lab, Bruce, and likes bowling, winter sports, exploring, and swimming. Dr. Hart has a new movie coming out soon, a documentary called "Galaxy Clusters: Giants of the Universe," about his outer space research. The movie showcases the Chandra X-ray Observatory, one of NASA’s four great observatories and the world’s most powerful telescopes for detecting X-rays. The movie has been accepted for screening at the U.S. Air Force Academy ("USAFA" for short) Planetarium and will highlight how scientists use clusters of galaxies, the largest bound objects in the Universe, to learn more about the formation and evolution of the cosmos --- as well as the space telescopes used for this purpose, and the stories of the astronauts who launched them and the scientists who went before Dr. Hart in learning more about the nature of the Universe.
Software Developer (Senior)
India India
Brij is a 3-times Microsoft MVP in ASP.NET/IIS Category and a passionate .NET developer. More than 6 years of experience in IT field, currently serving a MNC as a Tech Lead/Architect.

He is a very passionate .NET developer and have expertise over Web technologies like ASP.NET 2.0/3.5/4.0, jQuery, JSON, Javascript, IIS and related technologies. He is also a Exchange Server (EWS) Specialist. He has great experience in design patterns and N-Tier Architecture.

He is also certified as Microsoft Certified Technologies Specialist-ASP.NET and Microsoft Certified Technologies Specialist-WCF in .NET 4.0. He has also received several awards at various forums and his various articles got listed as "Article of the day" at ASP.NET Microsoft Official Website www.asp.net.

He has done MCA from NIT Durgapur and completed his graduation from Lucknow University.

Learning new technologies and sharing knowledge excites him most. Blogging, solving problems at various forums, helping people, keeps him busy entire day.


Visit his Blog: Code Wala

Area of Expertise :
C#, ASP.NET 2.0,3.5,4.0, AJAX, JQuery, JSON, XML, XSLT, ADO.Net, WCF, Active Directory, Exchange Server 2007 (EWS), Java script, Web Services ,Win services, DotnetNuke, WSS 3.0,Sharepoint Designer, SQL Server 2000/2005/2008
United States United States
I do not claim to be wrong! I just rarely ever write.
Software Developer (Senior) Crantech Solutions Ltd
England England
This member doesn't quite have enough reputation to be able to display their biography and homepage.
Software Developer (Senior) Clifford Nelson Consulting
United States United States
Has been working as a C# developer on contract for the last several years, including 3 years at Microsoft. Previously worked with Visual Basic and Microsoft Access VBA, and have developed code for Word, Excel and Outlook. Started working with WPF in 2007 when part of the Microsoft WPF team. For the last eight years has been working primarily as a senior WPF/C# and Silverlight/C# developer. Currently working as WPF developer with BioNano Genomics in San Diego, CA redesigning their UI for their camera system. he can be reached at qck1@hotmail.com.
United States United States
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.
Architect Scott Logic
United Kingdom United Kingdom
I am CTO at ShinobiControls, a team of iOS developers who are carefully crafting iOS charts, grids and controls for making your applications awesome.

I am a Technical Architect for Visiblox which have developed the world's fastest WPF / Silverlight and WP7 charts.

I am also a Technical Evangelist at Scott Logic, a provider of bespoke financial software and consultancy for the retail and investment banking, stockbroking, asset management and hedge fund communities.

Visit my blog - Colin Eberhardt's Adventures in .NET.

Follow me on Twitter - @ColinEberhardt

-
Engineer Comport Computing
United States United States
I am a software developer specializing in technical and numerical software systems and also a PhD Petroleum Engineer.
I started programming in IBM 1620 machine code in 1967, then FORTAN on CDC mainframes mainframes in 1970. I later used ALGOL, BASIC, FORTH, Pascal,Prolog, C, F#, C#, etc.
I generally use whatever language available thatallows me to accomplish what is neccesary.
Engineer
United States United States
Dr. Alexander Bell (aka DrABell), a seasoned full-stack DevOps and Data Engineer holds PhD in Electrical and Computer Engineering, authored 37 inventions and published 100+ technical articles, including those popular at CodeProject totaling 4M+ views. Alex pioneered AI/NLP, Cloud development, .NET/Java technology stacks, advanced SQL extensions, HTML5/CSS3 and other important Web technologies; developed multiple award-winning Web/Win apps submitted to App Innovation Contests (AIC 2012/2013). Currently focused on Microsoft Azure Cloud and GitHub Copilot AI-enabled DevOps.

  1. Quiz Engine powered by Azure Cloud (Dev Challenge article)
  2. 'enRoute': Real-time NY City Bus Tracking Web App (IoT on Azure)
  3. Azure web app: Engineering Calculator VOLTMATTER
  4. Azure: NYC real-time bus tracking app
  5. HTML5/CSS3 graphic enhancement: buttons, inputs
  6. Aggregate Product function extends SQL
  7. HTML5 Tables Formatting: Alternate Rows, Color Gradients, Shadows
  8. YouTube™ API for ASP.NET
United States United States
Writer, designer, inventor, musician, observer, and critic with many years of experience in each of these areas. I can do without the approval of "experts" because I believe candid statements and penetrating analysis bring greater rewards than a "pat on the back". And if I have something to say when you're not listening, I tell someone else about it.
Software Developer (Senior) Nephila Capital Ltd.
Bermuda Bermuda
An experienced .NET developer, currently working for Nephila Capital Ltd. in Bermuda. Author of "Pro WPF and Silverlight MVVM".
Software Developer (Senior)
Lithuania Lithuania
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.
Technical Lead sparXys
Israel Israel
Gil Fink is a web development expert and ASP.Net/IIS Microsoft MVP. He is the founder and owner of sparXys. He is currently consulting for various enterprises and companies, where he helps to develop Web and RIA-based solutions. He conducts lectures and workshops for individuals and enterprises who want to specialize in infrastructure and web development. He is also co-author of several Microsoft Official Courses (MOCs) and training kits, co-author of "Pro Single Page Application Development" book (Apress) and the founder of Front-End.IL Meetup. You can read his publications at his website: http://www.gilfink.net
Software Developer
United States United States
I am a software developer with a wide range of interests. Early in my career I started with Microsoft based technologies, did some Java, and am now again helping organizations with Microsoft based solutions.

My main goal in joining codeproject would be to post useful code that otherwise would not be available in Microsoft's documentation.
Technical Lead Thomson Reuters
United States United States
Ivan is a hands-on software architect/technical lead working for Thomson Reuters in the New York City area. At present I am mostly building complex multi-threaded WPF application for the financial sector, but I am also interested in cloud computing, web development, mobile development, etc.

Please visit my web site: www.ikriv.com.
Austria Austria
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.
Software Developer
Australia Australia
10+ years of experience in IT industry as Application developer and solution architect.
Software Developer
Australia Australia
Engineer
Portugal Portugal
My name is Nelson Souto, I develop software for fun and profit since 1992.
Software Developer (Senior) Systemize Informatik GmbH
Denmark Denmark
Software Developer / Contractor
Software Developer (Senior) Microsoft
United States United States
I started to program computers when I was 11 years old, as a hobbyist, programming in AMOS Basic and Blitz Basic for Amiga.
At 12 I had my first try with assembler, but it was too difficult at the time. Then, in the same year, I learned C and, after learning C, I was finally able to learn assembler (for Motorola 680x0).
Not sure, but probably between 12 and 13, I started to learn C++. I always programmed "in an object oriented way", but using function pointers instead of virtual methods.

At 15 I started to learn Pascal at school and to use Delphi. At 16 I started my first internship (using Delphi). At 18 I started to work professionally using C++ and since then I've developed my programming skills as a professional developer in C++ and C#, generally creating libraries that help other developers do their work easier, faster and with less errors.

Want more info or simply want to contact me?
Take a look at: http://paulozemek.azurewebsites.net/
Or e-mail me at: paulozemek@outlook.com

Codeproject MVP 2012, 2015 & 2016
Microsoft MVP 2013-2014 (in October 2014 I started working at Microsoft, so I can't be a Microsoft MVP anymore).
Team Leader
United Kingdom United Kingdom
My day job is mostly working in C++ with a bit of C#. I write a fair amount of command line based tools and really wish they could have a GUI front-end to them hence why I spend my spare time working with WPF.

I started a blog few years back but didn't do a lot with it. I've started describing some of the interesting programming things I come across on it. Please take a look.
Software Developer (Senior)
Canada Canada
Programmer at Maid LABS from 2003 (www.maidlabs.com)

Programmer-Analyst at Viasat Geo Technoligies from 1995 to 2002 (www.viasat-geo.com).

I have studied at École Polytechnique de Montréal in computer engineering.
Software Developer HP Microsystems
India India
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.
Software Developer
India India
Working since 2006 on VBA, VB6, VB.Net, C#, ASP.Net, MSSQL




  • Courage is not the absence of fear, but rather the judgement that something is more important than fear.
  • The fear of suffering is worse than the suffering itself.
  • People need not fear the unknown if they are capable of achieving what they need and want.
  • Every blessing ignored becomes a curse.
  • Sometimes what's in your head isn't as crazy as you think.
  • We never really grow up, we only learn how to act in public.
  • You can make very bad teams with very good individuals.
  • Admitting mistakes means you have a sense of responsibility in your actions and that shows you are more matured than almost anyone. -Nithin

Software Developer None
Canada Canada
Since I started programming when I was 11, I wrote the SNES emulator "SNEqr", the FastNav mapping component, the Enhanced C# programming language (in progress), the parser generator LLLPG, and LES, a syntax to help you start building programming languages, DSLs or build systems.

My overall focus is on the Language of your choice (Loyc) initiative, which is about investigating ways to improve interoperability between programming languages and putting more power in the hands of developers. I'm also seeking employment.
Architect
United States United States
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.
Web Developer Mahindra Logisoft Business Solution Limited, Chenn
India India
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.
Technical Lead
New Zealand New Zealand
http://nz.linkedin.com/in/macaalay
http://macaalay.com/
Red Gate Software Ltd.
United Kingdom United Kingdom
Redgate makes ingeniously simple software used by 804,745 IT professionals and counting, and is the leading Microsoft SQL Server tools vendor. Our philosophy is to design highly usable, reliable tools which elegantly solve the problems developers and DBAs face every day, and help them adopt database DevOps. As a result, more than 100,000 companies use products in the Redgate SQL Toolbelt, including 91% of those in the Fortune 100.
This is a Organisation

1 members
Software Developer (Senior) Decipha
Australia Australia
Wrote his first computer game in Microsoft Basic, on a Dragon 32 at age 7. It wasn't very good.
Has been working as a consultant and developer for the last 15 years,
Discovered C# shortly after it was created, and hasn't looked back.
Feels weird talking about himself in the third person.
Web Developer
United States United States
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.
CEO LightBuzz
United States United States
Vangos Pterneas is a Microsoft Most Valuable Professional in the Kinect technology. He helps companies from all over the world grow their revenue by creating profitable software products. Vangos is the founder of LightBuzz Inc. and author of two technical books.
Software Developer (Senior) Contractor
Egypt Egypt
My name is Waleed Eissa and I'm a software developer from Cairo, Egypt. I spent 7 years developing software for the banking industry, but has changed focus in recent years to Web development. I specialize in Microsoft technologies, esp. ASP.NET and C#, and am passionate about everything web. My main interests are user experience design (UX), performance tuning and scalability.

Website: http://www.waleedeissa.com
Blog: http://waldev.blogspot.com
Software Developer (Senior) Siemens
India India
A .net developer since 4+ years, wild, curious and adventurous nerd.

Loves Trekking/Hiking, animals and nature.

A FOSS/Linux maniac by default Wink | ;)

An MVP aspirant and loves blogging -> https://adventurouszen.wordpress.com/
You must sign in to participate in this contest.
This contest has ended.
1 Jul - 31 Jul 2011