Click here to Skip to main content
14,266,036 members

Best C# article of July 2011

This competition has ended

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.

9 Jul 2011
Paulo 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...
26 Jul 2011
Arjan van Dijk
Developing a small generic re-usable model using the highly flexible DC technology resulting in a fully functional mini-application
8 Jul 2011
Clifford Nelson
A special class is needed to support binding a set of flags to a View.
20 Jul 2011
Gil Fink
The post shows how to use the Geocode API in order to make an address lookup for a given location.
12 Jul 2011
RaisKazi
Walkthrough of Asp.Net Core Ajax
3 Dec 2013
Vangos Pterneas
How to create a WPF application performimg skeleton tracking.
5 Jul 2011
Nelson Kosta Souto
How to use key pressing on a form
16 Jul 2011
tsdragon
Application[“P...
20 Jul 2011
cmschick
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...
6 Jul 2011
Brian 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
10 Jul 2011
Mohammad A Rahman
Parse key/value of a Generic dictionary in C#.
27 Jul 2011
Ivan Krivyakov
BackgroundWorker and UI threads
21 Jul 2011
Ramanujam Shankar
Remove the triangle and star symbol from the row header in a DataGridView.
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...
4 Jul 2011
DrABELL
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[^]
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...
12 Jul 2011
johannesnestler
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{ ...
15 Jul 2011
Simon Bridge
Full code listing for a very simple but effective Colour-Combo (Color for those in America)
19 Jul 2011
Colin Eberhardt
How to create a conversation view, mimicking the SMS messaging interface within Windows Phone 7
22 Jul 2011
Brij
Generics and Constraints over Generics
21 Jul 2011
Gediminas Geigalas
Teleric MVC Grid ActionLink Column
27 Jul 2011
garymcleanhall
Towards better unit testing organization
27 Jul 2011
PeteBarber
Unit Testing C# Custom Attributes with NUnit
27 Jul 2011
PeteBarber
Unit Testing C# Custom Attributes with NUnit
28 Jul 2011
Qwertie
I want a conditional dot operator
29 Jul 2011
gsvolt
Draing a two-color line in Silverlight.
7 Jul 2011
#realJSOP
.Net 4 has the enum.HasFlag() method, which kinda obsoletes this tip. :)
1 Jul 2011
Mahadesh Mahalingappa
In Part 2 of Dynamic Loading of objects, I have created a custom Dependency Injection Framework
3 Jul 2011
Dr.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[^]
10 Jul 2011
GAMerritt
Getting a DllImport of kernel32's GetFullPathName to work (C#).
10 Jul 2011
Chris 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...
15 Jul 2011
Manoj Kumar Kota
Fetch Data from Google Analytics Service
18 Jul 2011
Philippe 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.
18 Jul 2011
AspDotNetDev
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...
20 Jul 2011
Gil Fink
What Model Binders are in ASP.NET MVC and how you can use them in your MVC applications.
21 Jul 2011
Raymund Macaalay
How to get the default record type of a user for event creation in Salesforce
23 Jul 2011
Prerak 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...
24 Jul 2011
GAMerritt
A C# method for finding ratio Q/R approximating real numbers.
25 Jul 2011
PeteBarber
A simple generic way to test Custom Attributes with NUnit.
25 Jul 2011
garymcleanhall
Skyhooks are undesirable, how to replace them in your code.
26 Jul 2011
#realJSOP
One way to effectively zero the columns any DataRow object.
29 Jul 2011
Bob 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...
19 Jul 2011
OriginalGriff
1 alternative  
I wrote this because I was interested in a Q&A question which asked for exactly that. Since I quite often use DataTables to transfer data, and to display it for debugging I knocked up an extension method to do it.
28 Jul 2011
JosipK
Explains how to detect which character is used as a separator in CSV file
26 Jul 2011
Kunal Chowdhury «IN»
Communicate Between Two Local Silverlight Applications
6 Jul 2011
Graeme_Grant
There is also the "app_offline.htm" in the root path
14 Jul 2011
Pete O'Hanlon
Learning how to program Windows Phone 7 from the very beginning
9 Aug 2011
Pranay Rana
How to do ordering when you require to order data by using multiple columns
7 Jul 2011
Alexander Gribkov
Using .NET 4 features to create a non-blocking user interface
25 Feb 2019
Mehdi Gholam
Smallest full text search engine (lucene replacement) built from scratch using inverted MGRB bitmap index, highly compact storage, operating in database and document modes

Current Participants

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

#realJSOP
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.
Kunal Chowdhury «IN»
Technical Lead
India India

Kunal Chowdhury is a former Microsoft "Windows Platform Development" MVP (Most Valuable Professional, 2010 - 2018), a Codeproject Mentor, Speaker in various Microsoft events, Author, passionate Blogger and a Senior Technical Lead by profession.

He is currently working in an MNC located in India. He has a very good skill over XAML, C#, Silverlight, Windows Phone, WPF and Windows app development. He posts his findings, articles, tutorials in his technical blog (www.kunal-chowdhury.com) and CodeProject.


Books authored:


Connect with Kunal on:




Alexander Gribkov
Software Developer
Russian Federation Russian Federation
No Biography provided
Arjan van Dijk
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.
AspDotNetDev
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):
Bob Sandberg
Web Developer
United States United States
No Biography provided
Brian C Hart
Software Developer (Senior) xyLOGIX, LLC
United States United States
No Biography provided
Brij
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
Chris Randle
Software Developer (Senior) Crantech Solutions Ltd
England England
C# software developer who works predominantly with web technologies. Interested in business process improvement, psychology of user interfaces - specifically within content management systems, and the use of technology to advance our daily lives.
Clifford Nelson
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.
cmschick
United States United States
No Biography provided
Colin Eberhardt
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

-
Dr.Walt Fair, PE
Engineer Comport Computing
United States United States
No Biography provided
DrABELL
Founder Infosoft International Inc
United States United States
Dr. Alexander Bell is a seasoned full-stack Software Engineer (Win/Web/Mobile). He holds PhD in EE/IT, authored 37 inventions and published 300+ technical articles. Currently focused on Java/Javascript, .NET/C#, Android/Mobile, SQL, 'Big Data', Machine Learning, AI, IoT. Alex participated in App Innovation Contests (AIC 2102/2013) with multiple winning submissions. Portfolio samples:

  1. Educational Web Portal
  2. NY Payroll Tax Calculator (#1 on Goog)
  3. Android Fraction Calculator "Fractal MK-12"
  4. Android Prime Factorization Calculator 18-digit)
  5. Semaphon™ semantic phone num-to-text converter
  6. Real-time NY Bus Tracking Web App (IoT)
  7. WebTV powered by YouTube .NET API (#1 on Goog)
  8. Engineering Calculator VOLTA
  9. Big Data: Facebook and YouTube
  10. NY City Trivia Quiz
  11. Publications by A. Bell
GAMerritt
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.
garymcleanhall
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".
Gediminas Geigalas
Software Developer (Senior)
Lithuania Lithuania
No Biography provided
Gil Fink
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
Graeme_Grant
Technical Lead
Australia Australia
No Biography provided
gsvolt
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.
Ivan Krivyakov
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.
johannesnestler
Austria Austria
No Biography provided
JosipK
Software Developer (Senior) GemBox Ltd
United Kingdom United Kingdom
Josip Kremenic works as a developer at GemBox Software.
He works on:

  • GemBox.Spreadsheet - a C# / VB.NET Excel component for reading and/or writing XLS, XLSX, CSV, HTML, PDF, XPS and ODS files.
  • GemBox.Document - a C# / VB.NET Word component for reading and/or writing DOCX, DOC, HTML, PDF, XPS, RTF and TXT files.
  • GemBox.Presentation- a C# / VB.NET PowerPoint component for reading and/or writing PPTX, PPT, PDF and XPS files.
  • GemBox.Email - a C# / VB.NET Email component for composing, receiving and sending MSG, EML and MHTML email messages using IMAP, POP and SMTP.
  • GemBox.Pdf - a C# / VB.NET Pdf component for for reading and/or writing PDF files.
No Biography provided
Manoj Kumar Kota
Software Developer
Australia Australia
10+ years of experience in IT industry as Application developer and solution architect.
Mehdi Gholam
Architect -
United Kingdom United Kingdom
Mehdi first started programming when he was 8 on BBC+128k machine in 6512 processor language, after various hardware and software changes he eventually came across .net and c# which he has been using since v1.0.
He is formally educated as a system analyst Industrial engineer, but his programming passion continues.

* Mehdi is the 5th person to get 6 out of 7 Platinum's on Code-Project (13th Jan'12)
* Mehdi is the 3rd person to get 7 out of 7 Platinum's on Code-Project (26th Aug'16)
Nelson Kosta Souto
Engineer
Portugal Portugal
My name is Nelson Souto, I develop software for fun and profit since 1992.
OriginalGriff
CEO
Wales Wales
Born at an early age, he grew older. At the same time, his hair grew longer, and was tied up behind his head.
Has problems spelling the word "the".
Invented the portable cat-flap.
Currently, has not died yet. Or has he?
Paulo Zemek
Software Developer (Senior) Niantic
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).
Pete O'Hanlon
CEO
United Kingdom United Kingdom
A developer for over 30 years, I've been lucky enough to write articles and applications for Code Project as well as the Intel Ultimate Coder - Going Perceptual challenge. I live in the North East of England with 2 wonderful daughters and a wonderful wife.

I am not the Stig, but I do wish I had Lotus Tuned Suspension.
PeteBarber
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.
Philippe Mori
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.
Pranay Rana
Software Developer (Senior)
India India

Microsoft C# MVP (12-13)



Hey, I am Pranay Rana, working as a Team Leadin MNC. Web development in Asp.Net with C# and MS sql server are the experience tools that I have had for the past 5.5 years now.

For me def. of programming is : Programming is something that you do once and that get used by multiple for many years

You can visit my blog


StackOverFlow - http://stackoverflow.com/users/314488/pranay
My CV :- http://careers.stackoverflow.com/pranayamr

Awards:


Prerak Patel
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

Qwertie
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.
RaisKazi
Technical Lead
United States United States
Full Stack Technology Professional

Hands-on experience with -
. Asp.Net, MVC, C#, Ajax
. JavaScript, Jquery, AngularJS
. Xamarin
. SharePoint
. VBScript

Tested flavors of -
. Java, Perl, Python, NodeJS, Android, IOS(little bit)
Ramanujam Shankar
Web Developer Mahindra Logisoft Business Solution Limited, Chenn
India India
No Biography provided
Raymund Macaalay
Technical Lead
New Zealand New Zealand
http://nz.linkedin.com/in/macaalay
http://macaalay.com/
Simon Bridge
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.
tsdragon
Web Developer
United States United States
No Biography provided
Vangos Pterneas
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.
You must sign in to participate in this contest.
This contest has ended.
1 Jul - 31 Jul 2011