Click here to Skip to main content
15,867,686 members
This competition has ended

Best C# article of April 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.
26 Apr 2011User 271009
Using Forms Authentication to secure access to ASP.NET MVC endpoints and WCF services
Please Sign up or sign in to vote.
8 Apr 2011Henry Minute
Or, there's always Scott Guthrie's LINQ To SQL Debug Visualizer[^].[Edit]While I'm posting links there is a nice utility that can output the generated SQL to the Debug Window in VS written by Kris Vandermotten.You can get it here[^].To use it: MyDataContext db = new...
Please Sign up or sign in to vote.
12 Apr 2011Kamran Behzad
You inspired me to contribute the DateTime extensions methods that I use in my programs. (But use at your own risk!). Thank you./// /// Date and Time Manager class./// public static class DateMan{ /// /// Returns the age in years for the given DOB...
Please Sign up or sign in to vote.
15 May 2011Raymund Macaalay
How to create WebPart properties.
Please Sign up or sign in to vote.
6 Apr 2011intrueder
My alternate uses the AddBezier method, and the size of the heart adjusts to the size of the form.private void Form1_Load(object sender, EventArgs e){ using(System.Drawing.Drawing2D.GraphicsPath path = new System.Drawing.Drawing2D.GraphicsPath()) { path.AddBezier(...
Please Sign up or sign in to vote.
6 Apr 2011Mahmudul Haque Azad
I found a better alternative of snoop... WPF Inspector! http://wpfinspector.codeplex.com/[^]
Please Sign up or sign in to vote.
9 Apr 2011Andrew Rissing
I would actually go the route getting those developers to follow good practice. As a whole, the field would be better off if developers like that were mentored rather than something like this.So, I would recommend using either of the techniques you put forth originally (using the Data...
Please Sign up or sign in to vote.
8 Apr 2011Chris Trelawny-Ross
You got me thinking about other ways to accomplish "objects that are not numbers honoring math operators without implementing the operators on the objects."I'm too long in the tooth of strongly typed languages to have a good comfort level with all things dynamic (although reading about the...
Please Sign up or sign in to vote.
24 Apr 2011Ondrej_Uzovic
A simple example showing how to implement encrypted communication between Windows Phone 7 and standalone .NET application.
Please Sign up or sign in to vote.
24 Apr 2011Wayne Ye
Personal Schedule Management Tool
Please Sign up or sign in to vote.
29 Apr 2011Midhunlal G 1 alternative  
Converting HTML Color Code to System.Drawing.Color(WinMobile application)
Please Sign up or sign in to vote.
28 Jul 2012hoonzis
Pex is a tool which helps generate inputs for unit test. Moles is a stub framework used to isolate the unit tests from code which is not being tested. In this post, I will try to describe an attempt to use Pex and Moles to test a typical business layer.
Please Sign up or sign in to vote.
6 Apr 2011testy_proconsul
bool bFailed = false; bFailed |= bFailed ? true : condition1; bFailed |= bFailed ? true : condition2; bFailed |= bFailed ? true : condition3; if( !bFailed ) { PerformActionOnAllSuccess(); ...
Please Sign up or sign in to vote.
20 Apr 2011PIEBALDconsult
Using Reflection to instantiate a System.Data.SqlClient.SqlException
Please Sign up or sign in to vote.
1 Apr 2011Pete O'Hanlon
A simple mechanism to limit the input of data to a TextBox so that it only accepted the relevant numeric amount.
Please Sign up or sign in to vote.
13 Apr 2011Yunyou Yao
This article shows the implementation of a row header in a grid based on data grouping, and retrieving cell information from a cell-based grid.
Please Sign up or sign in to vote.
19 Apr 2011Erion Pici
using System;using System.Configuration;using System.Collections.Generic;using System.ComponentModel;using System.Text;using System.Windows.Forms;namespace FadingForm{ public partial class FrmSplashScreen : Form { /// /// Indicates whether the...
Please Sign up or sign in to vote.
25 Apr 2011Gil Fink
A simple solution for using lambda extensions instead of strings while configuring a WCF Data Service
Please Sign up or sign in to vote.
25 Apr 2011Gil Fink
How to use the datajs library in order to make a JSONP call to a JSONP enabled WCF Data Service.
Please Sign up or sign in to vote.
4 Apr 2011Ondrej_Uzovic
A simple example showing how to communicate between a Silverlight application and a standalone .NET application using HTTP
Please Sign up or sign in to vote.
6 Apr 2011Member 4694807
Sorry, but I don't like adding additional artificial elements like function arrays . I would code it as following:If isok(Step1()) OrElse isok(Step2(1,1)) OrElse isok(Step3() OrElse isok(Step4() OrElse isok(0+1) thenend ifFunction isok(ByVal rc as Integer) As Boolean ...
Please Sign up or sign in to vote.
13 Apr 2011Manas_Patnaik
Relational/hierarchical data and CRUD operations against them using RIA
Please Sign up or sign in to vote.
12 Apr 2011Manas_Patnaik
How to convert the XML to a CLR object and use it as a datasource in a Silverlight app
Please Sign up or sign in to vote.
12 Apr 2011KevinPorter
How about using a Mutex? This should also work for Terminal Services sessions. Use in Program.csstatic Mutex mut;try{ bool isOwned = false; mut = new Mutex(true, Application.ProductName + " MUTEX: {53A4988C-F91F-4054-9076-220AC5EC03F3}", out isOwned); if (!isOwned)...
Please Sign up or sign in to vote.
14 Apr 2011Mike Thom
If you move your ViewState from the top of the page to the bottom, you will get better search engine spidering.Step 1Create a class file in App_code folder of your application and name it as PageBase.cs. Copy the following code to the class file.using System.IO;using...
Please Sign up or sign in to vote.
17 Apr 2011Gil Fink
Spreading Inheritance Tree Mapping Across Assemblies in Code First
Please Sign up or sign in to vote.
20 Apr 2011Yunyou Yao
How to merge two rows by drag-and-drop in DataGrid using MVVM.
Please Sign up or sign in to vote.
21 Apr 2011charles henington
Here Is A different way to get the source . This method will explain a small amount of what we can do with the .Net language, it will show you a simple way to use an interface.
Please Sign up or sign in to vote.
22 Apr 2011Karl Sanford
First, let me say that I would not recommend using the registry for this purpose. The registry is fraught with pitfalls to accommodate some really complex scenarios that you probably don’t want to mess with just so you can persist your form size. I would think that a user scoped configuration...
Please Sign up or sign in to vote.
24 Apr 2011Jephunneh Malazarte
How to use C# to programmatically purge cache of the Akamai proxy server
Please Sign up or sign in to vote.
25 Apr 2011Gil Fink
A simple example of making a JSONP call to a WCF Data Service using jQuery.
Please Sign up or sign in to vote.
4 May 2011Bourlesque
This article offers unified approach to implementation of user commands, converters, and validation rules. Those who are very curious can jump directly to the chapter Demonstration and to the source code (demo version with the original library is attached).
Please Sign up or sign in to vote.
26 Apr 2011Koder Hack
A priority queue to sort items according to a certain priority and retrieve the item with the highest priority.
Please Sign up or sign in to vote.
3 Apr 2011Tomer Shamam
How to open a Window, triggered by the View-Model.
Please Sign up or sign in to vote.
4 Apr 2011rudigrobler
A fix to the TextBox TextChanged event firing twice on the Windows Phone 7 emulator
Please Sign up or sign in to vote.
4 Apr 2011danishchopra
This article explains in detail about how to consume the Tinyit.cc link shortening and tracking service API in your C#/VB/PHP based web applications. Tinyit.cc is one of the best URL shorteners and provides a free API to access their spam free link shortening and tracking service.
Please Sign up or sign in to vote.
6 Apr 2011hjgode
A charmap tool like we have on Windows Desktop PCs
6 Apr 2011Resco Developer Tools
The article discusses how to capture location information on a mobile device and how to use this information for location-based services such as getting driving directions, create custom maps etc. The article also presents Resco.Location library that provides respective high-level .NET classes for W
8 Apr 2011Steve Hawley
a. Adding watermarks to images is a common task to protect an owner’s rights. With this tutorial and a free .NET imaging SDK from Atalasoft, this is a simple and efficient process.
Please Sign up or sign in to vote.
12 Apr 2011Manas_Patnaik
Using the BusyIndicator with the DomainDataSource control
Please Sign up or sign in to vote.
13 Apr 2011Manas_Patnaik
An in-depth look into the Presentation Model and its mode of handling related multiple entities
Please Sign up or sign in to vote.
12 Apr 2011Manas_Patnaik
Data binding in Silverlight with RIA and Entity Framework - validating input data
Please Sign up or sign in to vote.
12 Apr 2011Manas_Patnaik
In this post, we will replicate the cascade combo box loading scenario, where data of other combos depend on the selection in the first.
Please Sign up or sign in to vote.
12 Apr 2011Manas_Patnaik
Various approaches available for passing values between Silverlight pages
12 Apr 2011Dom_Smith
A look at how performance profiling can be integrated into the build process to form part of the automated test suite.
20 Apr 2011Artem A. Razin
In March 2011, Virtualization Technologies released a new version of the developer library that makes it possible to use virtualization in applications.
Please Sign up or sign in to vote.
18 Apr 2011Ryan Stewart
Skinning a List is quite a bit different than skinning something simple like a Button or a TextInput box
Please Sign up or sign in to vote.
18 Apr 2011D Y Chan
Consume WCF service with Windows Phone 7
Please Sign up or sign in to vote.
18 Apr 2011Kim Togo
Here is a methods that I use to round DateTime class to the next minute interval./// /// Rounds a date value to a given minute interval/// /// Original time value/// Number of minutes to round up or down...
25 Apr 2011Visual WebGui
Explore the implementation and integration of HTML5 in the powerful Visual WebGui .NET framework as a custom control using jQuery

Current Participants

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

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.
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)
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.
United States United States
I do not claim to be wrong! I just rarely ever write.
Software Developer (Senior) Baylor Healthcare System
United States United States
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.
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.
India India
Living beings is my heart, beautiful nature is my eyes, computer science is my oxygen and astro physics is my blood.
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.
Engineer
United Kingdom United Kingdom
I've been involved in object-oriented software development since 2006, when I graduated in Information and TLC Engineering. I've been working for several software companies / departments, mainly on Microsoft and Sun/Oracle technologies. My favourite programming language is C#, next comes Java.
I love design patterns and when I need to resolve a problem, I try to get the best solution, which is often not the quickest one.

"On the best teams, different individuals provide occasional leadership, taking charge in areas where they have particular strengths. No one is the permanent leader, because that person would then cease to be a peer and the team interaction would begin to break down. The structure of a team is a network, not a hierarchy ..."
My favourite team work quotation by DeMarco - Lister in Peopleware
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
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.
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 (Junior) OCTO Technology
Czech Republic Czech Republic
Writing software at ITG RFQ-hub.
LinkedIn
Blog
GitHub
Articles at OCTO blog
Software Developer DevelopEx
Ukraine Ukraine
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
Watch Anime...
Software Developer Snowy Hydro Ltd
Australia Australia
I am a .NET C# developer with an engineering background. I have been living and working in Sydney, Australia since 1993.
Software Developer Open Systems 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.
Software Developer (Junior) Employment Law Advisory Services 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 Miralix
Denmark Denmark
Has worked as a programmer since 1999, starting with C++/MFC, Java, PHP and MySQL. Now it is all about C# (my favorite programming language), MS SQL, Azure and Xamarin (iOS/Android/WP8)

My primary work is to create applications that interacts with PABC/PBX, Microsoft Lync / UCMA.
Software Developer TRG Tech
Pakistan Pakistan
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
Microsoft
India India
Nothing special .. I like challenges and love my critics.

Microsoft | Bangalore | India

Blog : http://manaspatnaik.com/blog

Twitter@manas_patnaik
Germany Germany
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.
Unicel Technologies
India India
.Net developer by job. C developer by passion.
Software Developer (Senior)
India India
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.
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.
Software Developer (Senior)
United States United States
BSCS 1992 Wentworth Institute of Technology

Originally from the Boston (MA) area. Lived in SoCal for a while. Now in the Phoenix (AZ) area.

OpenVMS enthusiast, ISO 8601 evangelist, photographer, opinionated SOB, acknowledged pedant and contrarian

---------------

"I would be looking for better tekkies, too. Yours are broken." -- Paul Pedant

"Using fewer technologies is better than using more." -- Rico Mariani

"Good code is its own best documentation. As you’re about to add a comment, ask yourself, ‘How can I improve the code so that this comment isn’t needed?’" -- Steve McConnell

"Every time you write a comment, you should grimace and feel the failure of your ability of expression." -- Unknown

"If you need help knowing what to think, let me know and I'll tell you." -- Jeffrey Snover [MSFT]

"Typing is no substitute for thinking." -- R.W. Hamming

"I find it appalling that you can become a programmer with less training than it takes to become a plumber." -- Bjarne Stroustrup

ZagNut’s Law: Arrogance is inversely proportional to ability.

"Well blow me sideways with a plastic marionette. I've just learned something new - and if I could award you a 100 for that post I would. Way to go you keyboard lovegod you." -- Pete O'Hanlon

"linq'ish" sounds like "inept" in German -- Andreas Gieriet

"Things would be different if I ran the zoo." -- Dr. Seuss

"Wrong is evil, and it must be defeated." –- Jeff Ello

"A good designer must rely on experience, on precise, logical thinking, and on pedantic exactness." -- Nigel Shaw

“It’s always easier to do it the hard way.” -- Blackhart

“If Unix wasn’t so bad that you can’t give it away, Bill Gates would never have succeeded in selling Windows.” -- Blackhart

"Use vertical and horizontal whitespace generously. Generally, all binary operators except '.' and '->' should be separated from their operands by blanks."

"Omit needless local variables." -- Strunk... had he taught programming
Technical Lead
New Zealand New Zealand
http://nz.linkedin.com/in/macaalay
http://macaalay.com/
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.
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 Atalasoft, a Kofax Company
United States United States
Steve Hawley is a software engineer/architect at Atalasoft, Inc., responsible for current and future component designs.
Web Developer
Germany Germany
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).
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.
Unknown
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
Software Developer (Senior) SAP Labs Shanghai
China China
Wayne is a software developer, Tech Lead and also a geek. He has more than 6 years' experience in Web development(server: ASP.NET (MVC), Web Service, IIS; Client: HTML/CSS/JavaScript/jQuery/AJAX), Windows development (Winform, Windows Service, WPF/Silverlight, Win32 API and WMI) and SQL Server. Deep understanding of GOF Design Patterns, S.O.L.i.D principle, MVC, MVVM, Domain Driven Design, SOA, REST and AOP.

Wayne's Geek Life http://WayneYe.com

Infinite passion on programming!
Web Developer
United States United States
Yunyou Yao is a Senior IT Specialist in Houston, USA.
You must sign in to participate in this contest.
This contest has ended.
1 Apr - 30 Apr 2011