Click here to Skip to main content
15,891,607 members
This competition has ended

Best C# article of January 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.
8 Jan 2011Xiaojie Liu
A Silverlight color picker (looks like ComboBox), more like the one used within VS 2010 property browser for editing color-type
Please Sign up or sign in to vote.
25 Oct 2012Enrique Albert
WPF Validation using the IDataErrorInfo interface combined with Validation attributes
Please Sign up or sign in to vote.
26 Jan 2011Abhijit Jana
Details explanation on Compression Enabled Session for SQL Server and State Server Session Mode in ASP.NET 4.0
Please Sign up or sign in to vote.
4 Jan 2011Oddleif Halvorsen
Solved: “The number of WaitHandles must be less than or equal to 64″
Please Sign up or sign in to vote.
6 Jan 2011Abhijit Jana
Get troubleshooting tips from your favorite blogs
Please Sign up or sign in to vote.
26 Jan 2011#realJSOP
When you need to communicate with the app that contains your ServiceHost object, use custom events
Please Sign up or sign in to vote.
14 Jan 2011Andrew Rissing
Not really that big of a change, but I'd go with an XPath solution. It locates all of the "magic strings" into one spot.var nodes = from element in XElement.Load("Books.xml").XPathSelectElements("/Books/Book/Subject") select new { Value =...
Please Sign up or sign in to vote.
19 Jan 2011Pranay Rana
Linq Joins with SelectMany
Please Sign up or sign in to vote.
7 Jan 2011Anupama Roy
How to delete a folder created via code programmatically
Please Sign up or sign in to vote.
16 Jan 2011Nikos Baxevanis
How to use types implementing the IAsyncResult interface on Windows Phone 7.
Please Sign up or sign in to vote.
19 Jan 2011Tomer Shamam
Blendability Part II – Design time support for Prism
Please Sign up or sign in to vote.
24 Jan 2011Henry Minute
I know that some people like to have line numbers and it is particularly useful if you are sending code to somebody else, like posting it on CP in Q&A when asking for help with a problem, for example. In cases like that, it is much easier to say "the error is on line 123".However, I don't...
Please Sign up or sign in to vote.
12 Jan 2011Amimpat
This article explains approaches to determine if an HTTP request is coming from a mobile phone and then redirecting the request to a page optimized for a mobile browser.
Please Sign up or sign in to vote.
7 Jan 2011Member 3128846
Example to implement remoting concept using SQL Server database
Please Sign up or sign in to vote.
7 Jan 2011Diamonddrake
How to scroll a parent control with mouse wheel while child control has focus
Please Sign up or sign in to vote.
10 Jan 2011jebarson
Multi Language / Multicultural Exception Handling In WCF Using FaultReason
Please Sign up or sign in to vote.
17 Jan 2011Michael Agroskin
Many LINQ functions have a hidden parameter useful to generate or analyze sequential indices
Please Sign up or sign in to vote.
16 Jan 2011Mark Brownsword
Designing the business intelligence application
Please Sign up or sign in to vote.
9 Feb 2011Abhijit Shiposkar 1 alternative  
Accessing Active Directory Objects via C# (Visual Studio)
Please Sign up or sign in to vote.
27 Jan 2011PankajKLohani
SIP address from active directory
Please Sign up or sign in to vote.
5 Jan 2011Bardy85
A simple class that converts HTMLTable to CSV
Please Sign up or sign in to vote.
6 Jan 2011Alex Furmanski
You should watch out for cases where the return value could be null otherwise you'll get an exception, and your call to ToString is redundant.OracleClob clob = Params[3].Value as OracleClob;if (clob.IsNull) errorCode = null;else errorCode = clob.Value;
Please Sign up or sign in to vote.
12 Jan 2011Paulo Morgado
How to create property set expression trees in a developer friendly way
Please Sign up or sign in to vote.
13 Jan 2011cechode
I ended up adding one for a Lazy Property: propLazy ...
Please Sign up or sign in to vote.
14 Jan 2011Steinar Moen from Norway
How to change the Namespace of a Message in a Custom Pipeline Component
Please Sign up or sign in to vote.
18 Jan 2011KevinAG
Sorry, but I have to vote this way down. Your regular expression (or @Chris's) is not robust enough for what I would consider "real world" data. Especially if this is used on any kind of public web site, I would be afraid of JavaScript injection attacks and other things (depending on its usage)....
Please Sign up or sign in to vote.
20 Jan 2011Gil Fink
Adding Metadata to Entities in The Data Model
Please Sign up or sign in to vote.
21 Jan 2011Parvez B
Synchronously returning a Dataset from Workflow Foundation to ASP.NET
Please Sign up or sign in to vote.
27 Jan 2011rudigrobler
Taking Sterling for a Test-Drive
Please Sign up or sign in to vote.
29 Jan 2011Gilly Barr
Join on tables using Fluent NHibernate
Please Sign up or sign in to vote.
5 Jan 2011Bardy85
Would it not be easier to capture your Error in your Global.aspx page?void Application_Error(object sender, EventArgs e){ Exception lastError = Server.GetLastError(); if (lastError == null) { ErrorLog("An error occurred, but no error information is available"); ...
4 Jan 2011Jason Beres
Infragistics delivers better insight into complex business data with their data visualization controls, data visualization user experience and the Infragistics Motion Framework that lets you quickly build rich, interactive data visualizations to give users richer insight with an engaging experience.
5 Jan 2011Resco Developer Tools
The article discusses various ways how to improve the performance of WP7 apps.
Please Sign up or sign in to vote.
10 Jan 2011erik_nl
Logging with dynamic objects in .NET 4.0 (part 1-n)
Please Sign up or sign in to vote.
10 Jan 2011erik_nl
Logging with dynamic objects in .NET 4.0 (part 2-n) - user interaction logging
Please Sign up or sign in to vote.
11 Jan 2011Liero_
I promised an alternative, so here is a good starting point:http://www.deanchalk.me.uk/post/Thread-Safe-Dispatcher-Safe-Observable-Collection-for-WPF.aspx It is custom implementation of INotifyCollectionChanged. As a bonus, it is thread-safe. :) For serialization support, you have to...
11 Jan 2011Dany Amiouny, Roger Khoueiry
In this paper, we will show how to use the Amyuni PDF components to dynamically view PDF documents within a Silverlight control. We will discuss how to create a Silverlight 3 control to display and interact with PDF documents. The same control can be used for viewing PDF, XPS or any document type.
Please Sign up or sign in to vote.
13 Jan 2011Steve Maier
To get this to work in .NET 4, you have to change the DLLImport signature.[DllImport("kernel32.dll", SetLastError = true)]private static extern IntPtr CreateFile( string lpFileName, uint dwDesiredAccess, int dwShareMode, ref SECURITY_ATTRIBUTES lpSecurityAttributes, ...
Please Sign up or sign in to vote.
16 Jan 2011Trollslayer
Look at switch/case, this is much better.Also, if you make the enum public then it can be accessed outside the class.
Please Sign up or sign in to vote.
19 Jan 2011Sanjay4India 1 alternative  
Append New line in multiline TextBox
Please Sign up or sign in to vote.
20 Jan 2011Leom Burke
EF Code First and WPF with the Chinook database. Part 1b – the provider
Please Sign up or sign in to vote.
26 Jan 2011Philippe Mori
If the number of conditions is relatively small, the following code would made sense: bool bFailed = true; if (!condition1_fails) { if(!condition2_fails) { ... if(!conditionN_fails) { bFailed=false; ...
31 Aug 2012Novalys
As companies look for different ways to manage their IT needs, “Multi-tenant” and “SaaS” applications are becoming more and more common. However, they also pose unique challenges. We will look at security administration and user management in a multi-tenant application with Visual Guard.
Please Sign up or sign in to vote.
29 Jan 2011mariangemarcano
A solution for converting MSTest TestCategory attribute to an equivalent implementation in xUnit.Net
Please Sign up or sign in to vote.
14 May 2017Sergey Alexandrovich Kryukov
An example the application of Enumeration class, third article of the series
Please Sign up or sign in to vote.
14 Mar 2012Sacha Barber
Shows you how to use CinchV2 with Prism 4 with ease.
Please Sign up or sign in to vote.
15 Jan 2011Corinna John
Encode a text by sorting notes.
Please Sign up or sign in to vote.
23 Jan 2011Sergey Alexandrovich Kryukov 1 alternative  
A generic class to be used as a conveyor for data and tasks between threads
Please Sign up or sign in to vote.
14 Jan 2011Sacha Barber
A look at Fluent APIs and an example of one.

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.
Technical Lead
India India
.NET Consultant | Former Microsoft MVP - ASP.NET | CodeProject MVP, Mentor, Insiders| Technology Evangelist | Author | Speaker | Geek | Blogger | Husband

Blog : http://abhijitjana.net
Web Site : http://dailydotnettips.com
Twitter : @AbhijitJana
My Kinect Book : Kinect for Windows SDK Programming Guide
Software 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.
Web Developer
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.
Web Developer
India India
i am fine
Architect
United States United States
Since I've begun my profession as a software developer, I've learned one important fact - change is inevitable. Requirements change, code changes, and life changes.

So..If you're not moving forward, you're moving backwards.
Software Developer (Senior) Dell
India India
I am a .Net developer working on C#,Asp.net,WCF,WF etc.I would like to utilize this space to share whatever I have come across so far working in .Net so that you can also learn & explore.

I hope you find these posts useful.I’d love to hear from you,so please post in your comments/feedback.

Visit my blog http://dotnetforyou.wordpress.com/ for more technical articles:
Software Developer
South Africa South Africa
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
Germany Germany
Corinna lives in Hanover/Germany and works as a C# developer.
Chief Technology Officer Amyuni Technologies
Canada Canada
Dany Amiouny started the development of the Amyuni PDF tools back in 1998. These tools are now embedded into thousands of applications and millions of desktops worldwide, and maintained by a team of experienced software developers. An expert in document conversion and processing, Dany is the CTO of Amyuni Technologies and provides consulting services to corporations worldwide. Dany holds a "Bachelor of Engineering" degree from the American University of Beirut and a "Masters in Business Administration" degree from McGill University.
Software Developer
United States United States
I am a part time programmer, The more I learn, the more I need to learn, the best of which I will share here on codeproject!

Visit my site and blog
Software Developer (Senior)
Ireland Ireland
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.
Software Developer
Netherlands Netherlands
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
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
Retired
United Kingdom United Kingdom
Retired Systems Admin, Programmer, Dogsbody.
Mainly on Systems for Local Government, Health Authorities,
Insurance Industry - (COBOL eeeeeeeugh).
Inventor of Synchronized Shopping.
Other Infragistics
United States United States
As the Vice President of Product Management, Community, and Evangelism, Mr. Beres spearheads customer-driven, innovative features and functionality throughout all of Infragistics' products. Mr. Beres is a Microsoft .NET MVP, a leading member of the INETA Speakers Bureau, and is the chairman of the INETA Academic Committee. He writes a monthly column for Visual Studio Magazine and is the author of numerous works including Teach Yourself Visual Studio .NET 2003 in 21 Days (Sams, 2003), and the coauthor of the Visual Basic .NET Bible (Wiley, 2001), the C# Bible (Wiley, 2002) and Silverlight 1.0 (Wrox, 2007).

Prior to joining Infragistics, Inc., Mr. Beres served as a .NET Architect and .NET Evangelist for Computer Ways, Inc., a Microsoft Gold Certified Partner. Before exclusively focusing his time on .NET, Mr. Beres taught Visual Basic and Windows DNA at a Microsoft CTEC. Mr. Beres also founded the Non-Profit Ways Community which enables developers to write .NET applications for non-profit charities that are otherwise unable to afford the technology required to write real-world .NET applications. In addition, Mr. Beres also co-founded the Florida.NET Users Group.
This is a Organisation (No members)

Software Developer (Senior) Microsoft Corporation
India India
I work for Microsoft on MS technologies for application development. My interests include .net, WCF, Azure, Windows Phone, ASP.net, SL, WCF, WPF and many more.

You can visit my site at http://www.jebarson.info

Follow me on twitter @jebarson007
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 Kingdom United Kingdom
I am a developer currently working for a financial company in the UK with a focus on back end work using NServiceBus. Personally I also enjoy working with ASP.NET (MVC), WPF, ruby and investigating best practice using methods like TDD and bettering the quality of code.
Slovakia Slovakia
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.
Russian Federation Russian Federation
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.
Denmark Denmark
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.
Software Developer (Senior)
Australia Australia
I've been working as a software developer since 2000 and hold a Bachelor of Business degree from The Open Polytechnic of New Zealand. Computers are for people and I aim to build applications for people that they would want to use.
Instructor/Trainer
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 (Senior) Liquidnet
United States United States
Michael is a software developer who still remembers punch cards, computers with 4 Kbytes RAM, and 3270s. His personal computers were Apple IIe, Commodore, and PC XT (with the whole 640 Kbytes RAM and 2 floppy drives!!!). Wow, that was a powerhouse.

Fast forward 32 years through FORTRAN, PL-I, Algol, Pascal, Prolog, LISP, C, Basic, Clipper, Assembly, FoxPro, DHTML, JavaScript, C++, you name it, to C# 4.0.

Of course, real men use machine code to write software, but what a difference a few years make! No more mallocs and callocs, GC magically collects unused objects, dynamic objects magically call IUnknown::QueryInterface, Reflection magically gives you metadata and even generates help files, WPF magically binds stuff together...

Read some of Michael's articles here.

BindingHub (a WPF component and a design pattern) [^].

Notifying parent of changes to children's properties [^].

Point-In-Time database (coming soon)

Composite Menus and other ItemsControls (coming soon)

Adorners framework (coming soon)

Drag-n-drop data transfer framework (coming soon)

Converters and MarkupExtensions (coming soon)

Download complete WPF library [^].
Greece Greece
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.
This is a Organisation

1 members
Technical Lead Software Innovation
Norway Norway
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.
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.
Software Developer (Senior) Paulo Morgado
Portugal Portugal
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 (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:


Marketing Resco
Slovakia Slovakia
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.
South Africa South Africa
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 Kingdom United Kingdom
I currently hold the following qualifications (amongst others, I also studied Music Technology and Electronics, for my sins)

- MSc (Passed with distinctions), in Information Technology for E-Commerce
- BSc Hons (1st class) in Computer Science & Artificial Intelligence

Both of these at Sussex University UK.

Award(s)

I am lucky enough to have won a few awards for Zany Crazy code articles over the years

  • Microsoft C# MVP 2016
  • Codeproject MVP 2016
  • Microsoft C# MVP 2015
  • Codeproject MVP 2015
  • Microsoft C# MVP 2014
  • Codeproject MVP 2014
  • Microsoft C# MVP 2013
  • Codeproject MVP 2013
  • Microsoft C# MVP 2012
  • Codeproject MVP 2012
  • Microsoft C# MVP 2011
  • Codeproject MVP 2011
  • Microsoft C# MVP 2010
  • Codeproject MVP 2010
  • Microsoft C# MVP 2009
  • Codeproject MVP 2009
  • Microsoft C# MVP 2008
  • Codeproject MVP 2008
  • And numerous codeproject awards which you can see over at my blog
Software Developer
India India
The Author holds degrees in Bachelor as well as Master of Computer Application. He firmly believes in the philosophy 'Sound Mind in Sound Body'. He loves Jogging, exersising and you may find him lost in deep thoughts when free.He feels Necessity is the mother of all logics and Programming can't be work but challenge whose output is fun n happiness.Bathroom is the place where he finds heaven. For a cloud application demo please do visit
https://www.youtube.com/watch?v=klGX6U0uURI
Architect
United States United States
Physics, physical and quantum optics, mathematics, computer science, control systems for manufacturing, diagnostics, testing, and research, theory of music, musical instruments… Contact me: https://www.SAKryukov.org
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.
Software Developer (Senior) InfernoRed Technologies
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 CodeValue
Israel Israel
Tomer Shamam is a Software Architect and a UI Expert at CodeValue, the home of software experts, based in Israel (http://codevalue.net). Tomer is a speaker in Microsoft conferences and user groups, and in-house courses. Tomer has years of experience in software development, he holds a B.A degree in computer science, and his writings appear regularly in the Israeli MSDN Pulse, and other popular developer web sites such as CodePlex and The Code Project. About his thoughts and ideas you can read in his blog (http://blogs.microsoft.co.il/blogs/tomershamam).
Tester / Quality Assurance
United Kingdom United Kingdom
This member doesn't quite have enough reputation to be able to display their biography and homepage.
Software Developer (Senior) TechExcel
United States United States
9 years of experience in programming solutions that focused on Visual C#, Visual C++, Visual Basic, and relational database design. Skilled in Object Oriented Programming in C#, Web site development using silverlight and scripting languages for interactive functionality, and networking fundamentals focused on maintaining connectivity and operation of server systems. Information Technology management professional with 5-year background in systems analysis, team leadership, program testing, and problem resolution, as well as personnel administration and professional development.
Now, I'm focusing on Silverlight and Ajax.
You must sign in to participate in this contest.
This contest has ended.
1 Jan - 31 Jan 2011