Click here to Skip to main content
15,894,090 members
This competition has ended

Best C# article of March 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.
1 May 2012AspDotNetDev 4 alternatives  
Call a series of functions until the return value meets a condition without a chained-if or short-circuiting.
Please Sign up or sign in to vote.
25 Mar 2011jmix90
In this post, we will see how to make a custom control fully useable in a Coded UI Tests scenario.
Please Sign up or sign in to vote.
15 Mar 2011Not Active
Using SPMetal to generate Linq to SharePoint classes
Please Sign up or sign in to vote.
6 May 2011Sofa Team
Sofa makes the link between AvalonDock and MEF, both using composable elements
Please Sign up or sign in to vote.
8 Mar 2011Mahmudul Haque Azad
Generic Method Problem in Unity Dependency Injection Container
Please Sign up or sign in to vote.
16 Mar 2011Albin Abel
Like HTML images, we can have clickable areas in a picturebox of windows application
Please Sign up or sign in to vote.
19 Mar 2011AspDotNetDev
Here is a slightly shorter version of your first conversion:object someValue = 1;int result = someValue as int? ?? -1;
Please Sign up or sign in to vote.
19 Mar 2011Jonathan Cardy
Please Sign up or sign in to vote.
3 Mar 2011Manas Bhardwaj
I would use Attachment [^] instead of MailAttachment[^]One should also use System.net.mail[^] instead of System.Web.Mail[^] which is now obsolete.
Please Sign up or sign in to vote.
16 Mar 2011Abhishek Sur
RegisterName for StoryBoards in WPF (NameScopes)
Please Sign up or sign in to vote.
7 Sep 2023Tragdor
A quick lesson in LINQ and dynamic Lambda statements
Please Sign up or sign in to vote.
3 Mar 2011Pete Mourfield
Building a Facebook Graph API application using ASP.NET
Please Sign up or sign in to vote.
5 Mar 2011SimmoTech
This code is 27% faster on my machine (.NET 4/AnyCPU on a 64bit i5 processor) for the Unicode test than the Ayoola/Bell algorithm.No unsafe code (in fact was 18% faster than the unsafe version as posted) and works with Unicode.public static string ToggleCase_SimmoTech(string s){ ...
Please Sign up or sign in to vote.
8 Mar 2011Hariharan Arunachalam
These are the same classes in VB.NET in case needed.I've also made the mail server address a parameter to allow the code to be runnable on copy paste.The problem while sending the bigger files was the smtp client's timeout(default 100s). I've made this dependent on the attachments' size...
Please Sign up or sign in to vote.
7 Mar 2011Mark Olbert
A declarative framework for building WPF wizards.
Please Sign up or sign in to vote.
1 Apr 2011Arik Poznanski
Flashcards.Show – Planning a Cross-Platform Solution
Please Sign up or sign in to vote.
14 Mar 2011rudigrobler
How to make the ApplicationBar bindable in a WP7 application.
Please Sign up or sign in to vote.
20 Mar 2011Thomas Willwacher
AutoGrayImage: An image class that changes to grayscale when it becomes disabled.
Please Sign up or sign in to vote.
27 Mar 2011Albin Abel
Instances of pages not accessible like other classes. This demonstrates how to instantiate a page and pass parameters through a custom HttpHandler.
Please Sign up or sign in to vote.
28 Mar 2011Ondrej_Uzovic
A simple example showing how to implement communication from a Windows Phone 7 to a standalone .NET application using HTTP
Please Sign up or sign in to vote.
29 Mar 2011Neil A. Harding
Please Sign up or sign in to vote.
29 Mar 2011rudigrobler
What data to save when your application is tombstoned
Please Sign up or sign in to vote.
2 Apr 2011AspDotNetDev
VB.NET Version (C# Version)Thanks to cechode for inspiring this tip/trick. Suppose you have the following functions:Function Step1() As Boolean Return TrueEnd FunctionFunction Step2(ByVal val1 As Integer, ByVal val2 As Integer) As Boolean Return val1 = val2End...
Please Sign up or sign in to vote.
22 Mar 2011Tragdor
How to make a robust GridView with filtering capabilities
Please Sign up or sign in to vote.
5 Mar 2011SimmoTech
Two more goes and then I'm done. (Wish I could get a job doing this kind of stuff! Wish I could get a job!)This is similar to my previous attempt but Reflector showed how ToLower() and ToUpper() are implemented and we can save some time by caching the CurrentCulture.TextInfo which saves...
Please Sign up or sign in to vote.
5 Mar 2011Gilly Barr
Fluent NHibernate - Working with Database Views
Please Sign up or sign in to vote.
7 Mar 2011#realJSOP
Extension method that checks for a properly Xaml-ized string
Please Sign up or sign in to vote.
10 Mar 2011Rick Bassham
A utility written in C# that you can use to upload files to a code.google.com project
Please Sign up or sign in to vote.
10 Mar 2011Rick Bassham
An easy way to do an AJAX call to another domain
Please Sign up or sign in to vote.
12 Mar 2011Joel Ivory Johnson
How to implement local high scores in Windows Phone 7
Please Sign up or sign in to vote.
20 Mar 2011Ed Nutting
C# Serialisation - The Best Way
Please Sign up or sign in to vote.
23 Mar 2011Narsimlu Keshagouni
Adding fonts to Infragistics WebHtmlEditor
Please Sign up or sign in to vote.
24 Mar 2011Guilherme Meinlschmiedt Abdo
A technique to automatically register JavaScript View files.
Please Sign up or sign in to vote.
24 Mar 2011SQLServerIO
Fast File Copy With Managed Code: UBCopy Update!
Please Sign up or sign in to vote.
7 Jan 2012Thomas Willwacher
A static resource with a Path property. For example, it can be used to redirect command handling to a resource object.
Please Sign up or sign in to vote.
30 Mar 2011Chris_Green
How to solve the issue of lost data in Repeaters on postback
Please Sign up or sign in to vote.
22 Mar 2011Tragdor
Code for creating postback rows in a GridView
Please Sign up or sign in to vote.
2 Mar 2011hjgode
Three tools to peridically launch an app, ping a list of hosts and show a notification
Please Sign up or sign in to vote.
3 Mar 2011Ron zigelman
Scalable state synchronization using P2P - Part 2 - Running the test application
Please Sign up or sign in to vote.
8 Mar 2011hjgode
This article uses a technique known as subclassing.
Please Sign up or sign in to vote.
16 Mar 2011R%S
Enable access from mobile phone emulator to Visual Studio WebDev.WebServer listening on localhost
Please Sign up or sign in to vote.
18 Mar 2011jfriedman
Interceping Method Calls based on Attributes
Please Sign up or sign in to vote.
21 Mar 2011Nitin Singh India
People wonder how do delegates work and the threading issues associated with multicast ones.
Please Sign up or sign in to vote.
22 Mar 2011supercat9
Another approach is to use a generic delegate-factory class. Essentially, the class has a field of generic type, a delegate field which accepts an argument of that type, an parameterless instance method which accepts an argument of that type and invokes the delegate with it, and a static method...
Please Sign up or sign in to vote.
23 Mar 2011Yiyi Sun
Rabbit Framework is a new lightweight framework for building web sites using ASP.NET Web Pages / WebMatrix. This article describes one interesting idea out of many found in the framework.
Please Sign up or sign in to vote.
23 Mar 2011MacMaverick
And yet another ...5% slower ... than the fastest to date -> SimmoTech's v2,(an awesome piece of righteously parsimonious code).85% less filling ... the diet version -> 44 vs 256 bytes(.Net v2 and above)private const int AddressBitsPerUnit = 5;private const int BitsPerElement =...
Please Sign up or sign in to vote.
24 Mar 2011Nick Reshetinsky
You may actualy skip delegate types when assigning a method to execute: private void DoLongOperation( ) { // long processing } Thread thr = new Thread(DoLongOperation); thr.Start( );
Please Sign up or sign in to vote.
24 Mar 2011WolfiG
An implementation which enables the end user to choose a Services Registry backend at runtime
Please Sign up or sign in to vote.
24 Mar 2011Rick Bassham
Example of how to write a custom LogParser input plugin, using SharpSvn to query an SVN repository

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.
President
India India
Did you like his post?

Oh, lets go a bit further to know him better.
Visit his Website : www.abhisheksur.com to know more about Abhishek.

Abhishek also authored a book on .NET 4.5 Features and recommends you to read it, you will learn a lot from it.
http://bit.ly/EXPERTCookBook

Basically he is from India, who loves to explore the .NET world. He loves to code and in his leisure you always find him talking about technical stuffs.

Working as a VP product of APPSeCONNECT, an integration platform of future, he does all sort of innovation around the product.

Have any problem? Write to him in his Forum.

You can also mail him directly to abhi2434@yahoo.com

Want a Coder like him for your project?
Drop him a mail to contact@abhisheksur.com

Visit His Blog

Dotnet Tricks and Tips



Dont forget to vote or share your comments about his Writing
Software Developer
India India
I am developer in .Net and GIS. albin_gis@yahoo.com
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).
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):
Architect Avaya Inc.
Ireland Ireland
Formerly a C++ client developer, nowadays I'm all about C# and ASP.NET. Over the years I have mastered some and played with many aspects of .NET.

Follow my blog as I catalogue the more arcane problems I encounter and their solutions at CodingLifestyle.com
Student
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
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
Software Developer FUNDAP - Fundação do Desenvolvimento Administrativ
Brazil Brazil
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.
Student
India India
Hariharan leapt into the field of programming after being introduced to C in his second year at college. A fan of basketball and chess, the logical thought process behind programming and the concepts of linking real principles onto a concrete platform pushed him deep into this field. On finishing his bachelor's majoring in Electrical and Electronics engineering with Soft Computing, Numerical Analysis and Biomedical Engineering as minor, he did a six month stint at India's second largest IT company- Infosys Technologies. He left Infosys armed with strong concepts of SDL Cycles and process development, gained domain knowledge in Java and had explored Visual basic, C++, C# and kept his mind open for more. Currently working in a startup as the product designer, his arsenal of technologies has doubled to accommodate the challenges his job demands.
Off work, he enjoys learning new languages (non-programming) and is currently teaching himself German and Spanish. He also enjoys travelling around and exploring new ideas, places and relationships.

Currently attempting to extend his education to post graduation.
Germany Germany
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
Livin in a lonely world, caught the midnight train going anywhere... Only thing is it was a runaway train... and it ain't ever goin back...
мала ка на хари, Trahentes ex exsilium
Software Developer http://wpf-france.fr
France (Metropolitan) France (Metropolitan)
Jonathan creates software, mostly with C#,WPF and XAML.

He really likes to works on every Natural User Interfaces(NUI : multitouch, touchless, etc...) issues.



He is awarded Microsoft MVP in the "Client Application Development" section since 2011.


You can check out his WPF/C#/NUI/3D blog http://www.jonathanantoine.com.

He is also the creator of the WPF French community web site : http://wpf-france.fr.

Here is some videos of the projects he has already work on :
Software Developer
United States United States
I attended Southern Polytechnic State University and earned a Bachelors of Science in Computer Science and later returned to earn a Masters of Science in Software Engineering. I've largely developed solutions that are based on a mix of Microsoft technologies with open source technologies mixed in. I've got an interest in astronomy and you'll see that interest overflow into some of my code project articles from time to time.



Twitter:@j2inet

Instagram: j2inet

Software Developer Repstor Ltd
United Kingdom United Kingdom
I am a Product Architect at Repstor.

Repstor custodian and Repstor Provisioning Engine provide case management and provisioning for SharePoint.

Repstor affinity provides uninterrupted access to content systems, like SharePoint through the familiar interface of Microsoft Outlook.
Australia Australia
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.
Software Developer (Senior) Vizrt Bangladesh
Bangladesh Bangladesh
I am truly versatile and 360 degree Engineer having wide range of development experience in .NET and Java Platform. I am also proficient in system level programming in C++. To me technology is not at all a problem, it’s the client requirement that matters! That is I am ready and comfortable to use any technology to make the business of my client a success.

In my five years of experience I have the opportunities to work for fortune 500 companies of US and many renowned clients from Europe.

My Linkedin Profile: http://bd.linkedin.com/in/mahmudazad
Architect
Netherlands Netherlands

Read my personal blog at www.manasbhardwaj.net.

Jump for Joy Software
United States United States
Some people like to do crossword puzzles to hone their problem-solving skills. Me, I like to write software for the same reason.

A few years back I passed my 50th anniversary of programming. I believe that means it's officially more than a hobby or pastime. In fact, it may qualify as an addiction Smile | :) .

I mostly work in C# and Windows. But I also play around with Linux (mostly Debian on Raspberry Pis) and Python.
Technical Lead
India India
Hi, I am Narsimlu Keshagouni working as Technical Lead in Hyderabad, India.
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.
Student
Ukraine Ukraine
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.
Technical Lead 3PillarGlobal
India India
I am a solutions lead working on .NET for about 10 years, focusing on core framework implementations in project. My development interests are in middle tier and backend components and sometimes, identifying design elements for technical solutions. Apart, I collect coins and stamps and do photography whenever I get a chance.
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
Slovakia Slovakia
My programming path started in 1987 when I got my first computer Sharp MZ-800.
It came with 8 bit CPU Z80, 64Kb RAM and the tape recorder. It was a great machine. I think I still have it somewhere.
I was fascinated and I started to write first programs. Eventually I became developer and software architect. I like innovations and clean nice solutions.
Software Developer (Senior)
United States United States
Software Developer
R%S
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
I have been a software developer since 2005, focusing on .Net applications with MS SQL backends, and recently, C++ applications in Linux, Mac OS X, and Windows.
Mandalogo / E4D Solutions
Israel Israel
My name is Ron Zigelman and I am a .NET ,P2P-WCF expert and consultant. I will share some code examples that can help in some development issues. You can contact me at
roniz.net@gmail.com
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) Hunton Information Systems Ltd.
United Kingdom United Kingdom
Simon Hewitt is a freelance IT consultant and is MD of Hunton Information Systems Ltd.

He is currently looking for contract work in London.

He is happily married to Karen (originally from Florida, US), has a lovely daughter Bailey, and they live in Kings Langley, Hertfordshire, UK.
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.
Chief Technology Officer SQLWatchmen Inc
United States United States
I’m Wes Brown, currently serving as CTO at SQLWatchmen and as happy as I’ve ever been in my professional career.
Over the past decade or so I’ve been focused on enterprise systems and SQL Server in particular.

That isn’t to say that’s all I’ve ever done just the thing that has brought me to this point in my professional career.
Web Developer
Unknown
Embedded systems programmer since 1994.
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) Clearview Energy
United States United States
I have been coding since the 80's. Well that is kinda true, since I took Computer Science in College, however, it wasn't until Microsoft created an application called Office that I actually started coding in the real world.

Since 1995, I have been in the IT field and dabbled at creating Network Provider business to hook into the internet. At the time T1 lines were the bomb and very expensive, I had one. My partners created a workshop to introduce Windows 95, by selling computers with the operating system already installed. We would house classes of internet browsing and how to use Windows. My partners and I were initially involved in supporting the beta Windows 95 so we were well qualified to instruct on that subject.
I researched and developed all of the business web pages and web applications. My knowledge of VB helped me rise into the ranks of Contractor where I would then learn Java, HTML, and more.
I have since built thousands of web pages and applications, joined the .NET band wagon (though now I am having PHP fun). I currently support SOA Architecture for a marketing firm. I have had lots of fun with .NET. I have recently created websites for my company using MVC and Web API. I like to blog about my experiences when I have a major roadblock and my blogs usually wind up here.
Germany Germany
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.
Architect
Canada Canada
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 Mar - 31 Mar 2011