Click here to Skip to main content
15,498,927 members
This competition has ended

Best C# article of August 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.
27 Sep 2011Shmuel Zang
In this article, I explain, step by step, how we can use a WCF behavior for logging operation's invoke and result, errors, warnings and information logs that include the operation's details.
Please Sign up or sign in to vote.
5 Oct 2011orouit
How to use smartcard certificates in your .NET application
Please Sign up or sign in to vote.
18 Aug 2011Brij
Single Sign On Between Sub Domains: Forms Authentication
Please Sign up or sign in to vote.
16 Aug 2011Damian Flynn
Here's a couple of gems...From IList to DataTable.From DataTable to array of T.// DataTable: from IListpublic static DataTable ToDataTable(this IList iList){ DataTable dataTable = new DataTable(); PropertyDescriptorCollection propertyDescriptorCollection = ...
Please Sign up or sign in to vote.
26 Aug 2011Jecho Jekov
How to use .NET settings files in class library projects.
Please Sign up or sign in to vote.
30 Aug 2011jsharrison
How to migrate User Settings properties between software versions after you've renamed them
Please Sign up or sign in to vote.
6 Sep 2011Gary H Guo
Add AOP capabilities to MEF by configuration using Dynamic Decorator.
Please Sign up or sign in to vote.
9 Aug 2011Kunal Chowdhury «IN»
If you are developing a secured site and want to close the browser window just after the user logs out from the application, this small tip will help you.
Please Sign up or sign in to vote.
12 Aug 2011George Mamaladze
Parallel Programing, PLINQ and Globalization
Please Sign up or sign in to vote.
30 Aug 2011jarvisa
"we cannot pass a Type as a function parameter" ???Yes we can. Just look at the parameter of Enum.GetValues for example._______Generic functions are unnecessary here. Just use Object.GetType to, um, get the type.private Enum GetNextEnum(object currentlySelectedEnum){ Type...
Please Sign up or sign in to vote.
31 Aug 2011Peter_Smithson
Using the DataZGrid provided by .NET 4, this article shows how to copy and paste between cells.
Please Sign up or sign in to vote.
13 Aug 2011Vano Maisuradze
Very nice!I've modified ToCollection(this DataTable dt) extension function, so if DataTable column names and class property names are different, then you can use this alternative:public static List ToCollection(this DataTable table, Dictionary dic){ List lst = new...
Please Sign up or sign in to vote.
23 Jun 2012Leland Richardson
How to dynamically create item templates on the server-side in ASP.NET.
Please Sign up or sign in to vote.
22 Aug 2011VallarasuS
Changing the BackGround of an UI Element based on MousePosition
Please Sign up or sign in to vote.
13 Aug 2011Kenneth Kasajian
The powerful DoFixture() in FitLibrary simulates English like specification. The PhraseFixture proposal takes this to the next level.
Please Sign up or sign in to vote.
3 Aug 2011Eric Lynch
Flexible CSV reader/writer with progress reporting and many file format variations.
Please Sign up or sign in to vote.
15 Aug 2011Caner Korkmaz 4 alternatives  
How to open the Internet browser from code.
Please Sign up or sign in to vote.
12 Aug 2011George Mamaladze
Why .NET LinkedList does not support Concat and Split operations?
Please Sign up or sign in to vote.
12 Aug 2011Kunal Chowdhury «IN»
Read this post to know how to detect the browser information using the HtmlPage.BrowserInformation property.
Please Sign up or sign in to vote.
17 Aug 2011bmckuhen
How to get a quick list of all DBs using SMO
Please Sign up or sign in to vote.
18 Aug 2011thatraja
Given below is code for opening the Internet browser programmatically in VB 6 and VB.NET.VB 6Private Declare Function ShellExecute Lib "shell32.dll" Alias _ "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, _ ByVal lpFile As String, ByVal lpParameters As...
Please Sign up or sign in to vote.
1 Sep 2011spartacus23
Dynamic Unit Testing
Please Sign up or sign in to vote.
1 Aug 2011Daniel Gidman
Serializable Extra Types for .NET 4[^]Does what you are looking for using attributes.
Please Sign up or sign in to vote.
8 Aug 2011Azhar Mehmood
Load Treeview From Database Table
Please Sign up or sign in to vote.
10 Aug 2011Arik Poznanski
WPF: Dictionary Value Converter
Please Sign up or sign in to vote.
10 Aug 2011Nadege Rouelle
Please Sign up or sign in to vote.
15 Aug 2011Kevin Marois
You're incorrect. Explorer is Windows Explorer, not Internet Explorer. Try this:System.Diagnostics.Process.Start("explorer");then this:System.Diagnostics.Process.Start("iexplore.exe", "http://www.codeproject.com");and this:System.Diagnostics.Process.Start("winword.exe",...
Please Sign up or sign in to vote.
19 Aug 2011User 468701
Force validation, even if the user doesn't enter anything, so that fields that are required show an appropriate message.
Please Sign up or sign in to vote.
28 Aug 2011Gilly Barr
Unit testing code for Fluent NHibernate
Please Sign up or sign in to vote.
30 Aug 2011ILa @ work
This nice trick extends into://*/block 1/*/block 2; // commented out/*/block 3;/*/block 4; // commented out//*/and removing the first slash gives inverted alternation:/*/block 1; // commented out/*/block 2;/*/block 3; // commented out/*/block...
Please Sign up or sign in to vote.
30 Aug 2011BrianBissell
This provides a much better overview of the problem/solution:http://www.codeproject.com/KB/webservices/OverloadingInWebService.aspxIntroductionThe function overloading in Web Service is not as straightforward as in class. While trying to overload member function, we make two or more...
Please Sign up or sign in to vote.
30 Aug 2011Norman Paterson
Oracle scrambles the first eight characters of the UserID
Please Sign up or sign in to vote.
29 Aug 2011Mike Hankey
Using the TaskDialog API as an attactive alternative to the standard windows MessageBox.
Please Sign up or sign in to vote.
1 Aug 2011fooksuen
Fiddler extension to tap all traffic to other host
Please Sign up or sign in to vote.
3 Aug 2011Eric Lynch
A class to read Unicode character names and a tool to display/search them.
Please Sign up or sign in to vote.
5 Aug 2011The_Mega_ZZTer
Version check is wrong. It happens to work correctly only because no minor versions of Windows 5 were released after 5.1 (AFAIK... are Windows Server 2003 and Embedded XP and Media Center XP still 5.1?). A theoretical version 5.2 would fail the check. I submit the following...
Please Sign up or sign in to vote.
12 Aug 2011mrjvdveen
Trivialities about nullable types
Please Sign up or sign in to vote.
17 Aug 2011Raspberry Man
How to create a labeled entity
Please Sign up or sign in to vote.
17 Aug 2011Michael B. Hansen
If I remember correctly, then I had some issues with the above method some years ago. It would not always work on some systems.I personally use the following method to get the EXE path to the system's default browser:public static string GetDefaultBrowser(){ string browser =...
Please Sign up or sign in to vote.
30 Aug 2011Ross Brigoli
How to simulate the MaxLines property in a Silverlight TextBox.
Please Sign up or sign in to vote.
19 Aug 2011ColinBashBash
Getting Lazy to work for me.
Please Sign up or sign in to vote.
23 Aug 2011Radu Pascal
Support for enums in Entity Framework is probably the most desired feature, and it's strange it is not supported. This article will show a way to implement it using templates.
Please Sign up or sign in to vote.
23 Aug 2011b4usat 1 alternative  
How to show the cell value as a tool tip for a Windows Form Grid.
Please Sign up or sign in to vote.
24 Aug 2011Daniel Gidman
I think the compile time force for a little enum enforcement would look something like this... (excuse the bad syntax, doing it from memory)private T GetPreviousEnum(this T currentlySelectedEnum) where T: structStackOverflow has a good question and answer in relation to it here.[^].
Please Sign up or sign in to vote.
24 Aug 2011George Swan
Can't you do the same thing without the need for a select statement?XElement xElement = XElement.Load(path);xElement.Elements ("Node").Remove();xElement.Save(path);
Please Sign up or sign in to vote.
30 Aug 2011Narf the Mouse
Seeing as I "researched" your code and the code on StackOverflow for my own implementations, I figure I should post this - It's a default enumerator for any Enum. Free to use, free to copy; just attribute alike :) : /// /// Created based on the "Passing Enum type...
22 Aug 2011David Abramson
Discover how quickly and easily you can create BI apps, deploy scalable dashboards and reports, and embed analytics into existing apps. You can then deploy your apps to any number of users on any platform, including mobile - all without per-user fees.

Current Participants

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

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:




Software Developer (Senior) Verint
Israel Israel
Arik Poznanski is a senior software developer at Verint. He completed two B.Sc. degrees in Mathematics & Computer Science, summa cum laude, from the Technion in Israel.

Arik has extensive knowledge and experience in many Microsoft technologies, including .NET with C#, WPF, Silverlight, WinForms, Interop, COM/ATL programming, C++ Win32 programming and reverse engineering (assembly, IL).
Software Developer
Pakistan Pakistan
Azhar Mehmood
Education: Computer Science
India India
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.
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.
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)
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
Student
Turkey Turkey
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.
Software Developer
United States United States
likes boardgames, computer games, and enjoys his .net programming job.
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 Stackify
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.
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)
United States United States
Eric is a Senior Software Engineer with 30+ years of experience working with enterprise systems, both in the US and internationally. Over the years, he’s worked for a number of Fortune 500 companies (current and past), including Thomson Reuters, Verizon, MCI WorldCom, Unidata Incorporated, Digital Equipment Corporation, and IBM. While working for Northeastern University, he received co-author credit for six papers published in the Journal of Chemical Physics. Currently, he’s enjoying a little time off to work on some of his own software projects, explore new technologies, travel, and write the occasional article for CodeProject or ContentLab.
Software Developer Nokia Siemens Networks
Hong Kong Hong Kong
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.
United States United States
Object-oriented (OO) is about "classes" not "objects". But I truly believe that "objects" deserve more our attentions. If you agree, read more on... Dynamic Object Programming (DOP), Component-Based Object Extender (CBO Extender), AOP Container and Dynamic Decorator Pattern.

Mobile development is not just another type of front end. The real challenge is actually in the back end: How to present meaningful information in time to mobile users with exponentially increased data flooding around? Here is my first mobile solution: SmartBars - Barcode Reader, Price Comparison and Coupons.

Gary lives in southeast Michigan. My first programming language is FORTRAN. For the last a few years, I have primarily focused on .NET technologies with Mobile Development as my newest interest.
Software Developer
Germany Germany
Tweeter: @gmamaladze
Google+: gmamaladze
Blog: gmamaladze.wordpress.com
Student
Wales Wales
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.
Web Developer
Israel Israel
Started programming e-commerce sites with PHP & MySQL at the age of 14. Worked for me well for about 5 years.

Transfered to C# & asp.net, while serving in the IDF.
Worked on the 'Core Performance' Team at ShopYourWay.com (Sears Israel)
Currently working at Logz.io

Check out my blog!
or my twitter
Engineer
Netherlands Netherlands
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.
Software Developer (Senior) Shaw Inspection Systems Ltd
United Kingdom United Kingdom
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.
Software Developer (Senior)
Bulgaria Bulgaria
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.
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)
New Zealand New Zealand
I’ve been writing software in a variety of languages and platforms since 1990.
United States United States
My interests mostly revolve around making machines do work for people. I'm a computer programmer, software architect, development manager, program manager and a computer programmer. I said programmer twice because I believe you need to be able to do the work yourself if you're going to direct others. I started my career creating software for abstract art, followed by work in embedded systems and HMI. In the 90s I created a successful product called Visual DLL and helped develop the Sales Force Automation product, Arsenal. I've often been involved in online communities, creating games, utilities, and collaboration software. I'm passionate about agile requirements management, acceptance testing through executable specification, and anything that will make developers more productive. My current role is Principal Scientist where I get to work on different technologies with an awesome team, to solve real-world practical problems. I'm Armenian, so talking is in my nature -- if you see me online or offline, say hi and we'll geek out about the latest tools and libraries. If you learned something cool recently (and you should if you're a lifelong learner), then I'd like to hear about it.
CEO Marois Consulting
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.
Founder
United States United States
My name is Leland Richardson. I love learning. At the time of writing this I am 23 years old and live in Houston, TX. I was born in West Palm Beach, Florida, grew up in St. Louis, Missouri, and went to school in Houston, Texas at Rice University.

At Rice I received two degrees: one in Physics and one in Mathematics. I love both. I never received any formal education on Computer Science, however, you will find that most of this blog will be about programming and web development. Nevertheless, I think being a good programmer is about being good at learning, and thinking logically about how to solve problems - of which I think my educational background has more than covered.

Since high-school, I had found that the easiest way to make money was by programming. Programming started off as a hobby and small interest, and slowly grew into a passion.

I have recently started working on a new startup here in Houston, TX. I wont bore you with the details of that just yet, but I am very excited about it and I think we can do big things. We plan to launch our project this year at SXSW 2013. What I will say for now, is that we would like to create a company of talented software developers who are similarly ambitious and want to create cool stuff (and have fun doing it).
Netherlands Netherlands
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.
Founder CWAIN
Denmark Denmark
I have a MCPD .NET 3.5 EAD and a Bsc in computer science, organizational theory and economics.
After more than 15 years working as professional system engineer, I founded the independent consultant agency CWAIN.
Retired
United States United States
Currently enjoying retirement and working on projects without pressure, deadlines or any kind of management.
Software Developer (Senior) KnowledgePlaza
Netherlands Netherlands
Since early 2001 I've been working full time as a software developer and since 2004 I've been working mostly with Microsoft technology.
I started out as a product developer, but after a few years I switched to a project company where my roles ranged from developer up to consultant and from team lead and coach to manager.
Eventually I switched jobs and focused on the consultant part and then I got back to building a product once again. Now I work in a job where I get to do both.
Architect
France France
I'm coding in .Net since 9 years, most with ASP.Net and SharePoint and a little using WPF, MVC, Windows Phone 8 and WinRT technology.
I have learned so much reading others experience and tutorials, or tips so I try to do the same, keeping learning from others of course.
You can also find my blog here : http://sharemstips.wordpress.com/
Canada Canada
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.
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 Connect In Private
Singapore Singapore
Software Architect, COM, .NET and Smartcard based security specialist.

I've been working in the software industry since I graduated in Electrical and Electronics Engineering. I chose software because I preferred digital to analog.

I started to program with 6802 machine code and evolved to the current .NET technologies... that was a long way.

For more than 20 years I have always worked in technical positions as I simply like to get my hands dirty and crack my brain when things don't go right!

After 12 years in the smart card industry I can claim a strong knowledge in security solutions based on those really small computers!
I've been back into business to design the licensing system for the enterprise solution for Consistel using a .NET smart card (yes they can run .NET CLR!)

I'm currently designing a micro-payment solution using the NXP DESFire EV1 with the ACSO6 SAM of ACS. I can then add a full proficient expertise on those systems and NFC payments.
This technology being under strict NDA by NXP I cannot publish any related article about it, however I can provide professional consulting for it.

You can contact me for professional matter by using the forum or via my LinkedIn profile.
United Kingdom United Kingdom
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.
Software Developer (Senior) gbLabs
Romania Romania
Radu is a Senior Developer in a big multinational software company. He is oriented on software design, enhancing frameworks, using the newest cutting edge technologies.
Software Developer Microsoft
United States United States
LNG: Turbo Pascal → Delphi → C/C++ → C# & ASP.NET

DBE: MS Access → MS SQL Server 2000 → Linter → MySQL → MS SQL Server 2005 → MS SQL Server 2008 & Db4o & Oracle & Teradata

ENV: Turbo Pascal → Delphi → C++Builder 5/6 → VS2005 → VS2008 → VS2010
Switzerland Switzerland
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.
Software Developer (Senior)
Philippines Philippines
Ambitious geek.

MCPD-EA
MCTS .NET 2.0, MCTS .NET 3.5
Software Developer
Israel Israel
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.
Software Developer (Senior)
Italy Italy
My name is Idalgo Cantelli. I'm a software developer skilled in .Net technologies. I work with .Net since February, 2002. I also have a strong experience as a technical trainer, having taught in more than thirty classroom courses. I'm MCTS and MCPD-EAD on .Net 2.0, planning an upgrade to 3.5.
Team Leader
India India
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.
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.
Australia Australia
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.
Technical Lead
India India
I code, learn, read and listen.
Architect
Georgia Georgia
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.
You must sign in to participate in this contest.
This contest has ended.
1 Aug - 31 Aug 2011