Click here to Skip to main content
14,579,769 members

Best C# Article of April 2018

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.

20 Apr 2018
Eric Lynch
Part 3 in the LINQ series, this provides an introduction to IQueryable, IQueryProvider, and LINQ expression trees.
1 Aug 2018
AndyEdmonds
A free service makes it possible to use a fuzzy logic expert system online. We'll go through an example of coding in .NET core to access this, and look at some of the features of the engine and the DARL language.
26 May 2018
Victor Dashevsky
Processing the positioning information of visual objects detected by Pixy camera and received on Raspberry Pi via I2C, and using common design patterns in a C# program parsing robotics sensor data
8 Apr 2018
Allister Beharry
We'll use the ClassifyBot program to put together an ML pipeline to solve a text classification problem using open-source ML components
1 Apr 2018
Sergey Alexandrovich Kryukov
The mystery of Benham’s top invented in 1895, as well as Fechner color effect, remains not fully uncovered so far. WPF and XAML help to accelerate the research greatly.
4 Apr 2018
Clifford Nelson
This behavior will require that for any Group of ToggleButton/Checkbox controls that are associated together, the user cannot set all to not IsChecked.
23 Apr 2018
OriginalGriff
How to colour the individual cells of a DataGridView according to their content. For example, negative values can be Red, positive values Green to show "Up"s and "Down"s more easily.
27 Apr 2018
Arthur V. Ratz
In this article, we will formulate and discuss CLOPE data mining clustering algorithm that allows to drastically increase the quality and efficiency of categorized data clustering and can be easily used for recommendation-specific purposes
7 Apr 2018
#realJSOP
An example of evolving code to fit new demands
5 Apr 2018
Jay Kang
Introduction to a new approach to distribution
18 Apr 2018
Clifford Nelson
I had a situation where a control appearing was significantly affected by the initialization of the UserControls. This behavior fixed my problem.
27 Apr 2018
Clifford Nelson
This is a behavior that that will reset ToggleButton derived controls to false (or a specified default value) when the container's visibility becomes false.
2 Apr 2018
Clifford Nelson
This tip provides a behavior that will reset all RadioButton controls within a Control that has this behavior when the Visibility changes.
3 Apr 2018
Clifford Nelson
Normally a popup will stay open until explicitly closed. The Behavior will close the Popup if the mouse is clicked within or outside the Popup area or leaves the Popup area.
5 Apr 2018
Clifford Nelson
Normally, there is no need to ensure that types exactly match when using a Binding. For instance, the Control property double to and int in a ViewModel
20 Jun 2018
vnmatt
How to take advantage of ASP .NET Core's Razor (.cshtml) views and have dynamic routes for Aurelia
8 Apr 2018
Sem Shekhovtsov
The how-to article that summarises best practices for unit testing ASP NET Core MVC controller using NUnit and Moq framework
25 Jun 2018
Sean Rand
This is an article to help you clean up browser processes during automated Selenium testing.
1 Apr 2018
Daniel Vaughan
Learn how to leverage the asynchronous ICommand implementation in Codon FX to support commands that kick-off long-running operations.
24 Apr 2018
Yisrael Lax
Library that provides custom casting functionality from one type to another between properties with disparate names and types
1 Apr 2018
Clifford Nelson
This is a control that is like a Expander Control but there is both Expanded and not Expanded Content. It demonstrates some concepts on how to easily create controls whose functionality can be mostly implemented in the XAML with the code behind being mostly DependencyProperty definitions.
19 Apr 2018
Kamran Bigdely-Shamloo
Formulas to Convert Right-Handed Vectors and Quaternions to Left-Handed Equivalents
27 Apr 2018
Member 11896794
This custom database first approach token authentication will enable you to apply token-based authentication in your application in a simple way with no hassle.
3 Apr 2018
Christiaan van Bergen
How to perform XPath queries on all lower case elements
18 Apr 2018
Dave Elliott
A custom framework that will parallelize data processing through a pipeline framework
19 Apr 2018
charles922
AngularJS and REST API Tutorial - Part 2
28 Apr 2018
MilanGohil
This article contains possible basic questions along with their answers to help you to understand or gain basic knowledge about Xamarin.
19 Apr 2018
Sudip Bhakta
How to create AWS Serverless API (API Gateway + Lambda Function) in .NET Core, C# using AWS SDK for Visual Studio
18 Apr 2018
Zoltán Zörgő
One application, multiple SignalR endpoints with different hubs
27 Apr 2018
charles922
AngularJS and REST API Tutorial: Part 3
8 Apr 2018
Sameh Abdel Mongy
Deploy Reports rdl files to SSRS using C# script
4 May 2018
Marc Clifton
Learning how to programmatically manipulate SVG in Javascript
19 Apr 2018
BenHall_io
Most articles and documentation about the 'out of the box' C# Debug and Release build configurations were written prior to Roslyn. I take a fresh look at what you now get under the covers in 2018.
28 Apr 2018
LiYS
Finalizer case explained
5 Apr 2018
syed shanu
In this article, we will see in detail how to display role-based dynamic menu after a user logs in. For this, we will create a Menu Master table and insert a few records to display the menu and link the URL to the menu based on the logged in user's role.
5 May 2018
George Swan
This article illustrates how to solve the Dining Philosophers' Problem using the Task Based Asynchronous Pattern
10 Apr 2018
Igor Ladnik
The sample provides Web access to devices status and displays dynamic metrics charts with ASP.NET Core 2.0, SignalR, Angular 5 and Chart.js.
9 Apr 2018
charles922
Easy to Use Plotting Utility
1 Mar 2019
ipavlu
The goal of the Unified Concurrency is to unify access to different synchronization primitives in object-oriented fashion with one pattern and two interfaces for general and async/await methods.
21 Apr 2018
Wade Harvey
This article shows how to use Winforms, WPF and C# to create a File Explorer Clone with Tabs and an extremely fast parallel file search utility.
6 Apr 2018
PIEBALDconsult
A Trim method for strings that provides flexibility without requiring the use of large character arrays
4 Mar 2019
marcusts
The mis-use of async/await point to an underlying lack of awareness of C# design principles, including event-driven programming. The post The Foreground Await / Async Anti-Pattern appeared first on Marcus Technical Services..
5 May 2020
Member 4201813
Jumping along the System.Random output sequence with logarithmic complexity
25 Apr 2018
Eric Lynch
Part 4 in the LINQ series, contrasts the System.Linq.Enumerable and System.Linq.Queryable extension methods and explores how expression trees are produced and consumed.
12 Aug 2019
Mohammed Dawood Ansari
"How to export the List into an Excel file" in a generic way using NPOI with .NET/.NET Core WEB API
27 Apr 2018
Burim Hajrizaj
Building very thin database layer when using unit of work pattern together with Enityframework
25 Apr 2018
Clifford Nelson
Concept to create a Singleton for WPF MVVM Binding, and using Weak reference for the property that is bound to.
24 Apr 2018
raddevus
Learn to break your code into components using Razor Pages and PartialViews while creating a basic login control.
18 Apr 2018
Eric Lynch
A very quick survey of the standard LINQ methods defined in the System.Linq.Enumerable class

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.
Zoltán Zörgő
Technical Lead
Hungary Hungary
No Biography provided
Allister Beharry
Software Developer
Trinidad and Tobago Trinidad and Tobago
I've been programming computers as a hobby and professionally for almost 20 years. I like both Windows and Linux. My current areas of interest are computer security, machine learning and .NET HPC.
AndyEdmonds
United Kingdom United Kingdom
No Biography provided
Arthur V. Ratz
Software Developer (Senior) EpsilonDev
Ukraine Ukraine
I’m software developer, system analyst and network engineer, with over 20 years experience, graduated from L’viv State Polytechnic University and earned my computer science and information technology master’s degree in January 2004. My professional career began as a financial and accounting software developer in EpsilonDev company, located at L’viv, Ukraine. My favorite programming languages - C/C++, C#.NET, Java, ASP.NET, Node.js/JavaScript, PHP, Perl, Python, SQL, HTML5, etc. While developing applications, I basically use various of IDE’s and development tools, including Microsoft Visual Studio/Code, Eclipse IDE for Linux, IntelliJ/IDEA for writing code in Java. My professional interests basically include data processing and analysis algorithms, artificial intelligence and data mining, system analysis, modern high-performance computing (HPC), development of client-server web-applications using various of libraries, frameworks and tools. I’m also interested in cloud-computing, system security audit, IoT, networking architecture design, hardware engineering, technical writing, etc. Besides of software development, I also admire to write and compose technical articles, walkthroughs and reviews about the new IT- technological trends and industrial content. I published my first article at CodeProject in June 2015.
BenHall_io
Software Developer (Senior)
United Kingdom United Kingdom
Ben is an Expert .NET Software Engineer at the United Kingdom Hydrographic Office. He previously worked for 9 years as a school teacher, teaching programming and Computer Science. He enjoys making complex topics accessible and practical for busy developers.

He works day-to-day with:

C# / ASP.NET
NServiceBus
SQL Server
JavaScript, jQuery etc…
PowerShell + DSC
Burim Hajrizaj
Software Developer (Senior) Trigonit AB
Sweden Sweden
Developer with broad skills set and architecture awareness with more than 20 years’ experience in design and development of client/server, web based and n-tier applications. Extensive experience on windows applications as well as web applications, windows services, web services and similar
charles922
Software Developer (Senior)
United States United States
Chuck Peasley is a developer in Orange County, CA
Christiaan van Bergen
Software Developer (Senior) NoNerds
Netherlands Netherlands
No Biography provided
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.
Daniel Vaughan
President Outcoder
Switzerland Switzerland
Daniel Vaughan is a nine-time Microsoft MVP and co-founder of Outcoder, a Swiss software and consulting company dedicated to creating best-of-breed user experiences and leading-edge back-end solutions, using the Microsoft stack of technologies--in particular Xamarin, WPF, and the UWP.

Daniel is the author of Windows Phone 8 Unleashed and Windows Phone 7.5 Unleashed, both published by SAMS.

Daniel is the developer behind several acclaimed mobile apps including Surfy Browser for Android and Windows Phone. Daniel is the creator of a number of popular open-source projects, most notably Codon.

Would you like Daniel to bring value to your organisation? Please contact

Blog | MVP profile | Twitter


Xamarin Experts
Windows 10 Experts
Dave Elliott
Software Developer (Senior) Webbert Solutions
United States United States
Dave is an independent consultant working in a variety of industries utilizing Microsoft .NET technologies.
Eric Lynch
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.
George Swan
Student
Wales Wales
No Biography provided
Girish Kalamati
Software Developer (Senior) Mindtree
India India
I am a person who thinks in varied directions rather than sticking or thinking the usual way and has tendency to learn new things........ always
Igor Ladnik
Software Developer (Senior)
Israel Israel


  • Nov 2010: Code Project Contests - Windows Azure Apps - Winner
  • Feb 2011: Code Project Contests - Windows Azure Apps - Grand Prize Winner


ipavlu
Software Developer
Czech Republic Czech Republic
Hi, I am Marek Pavlu,

I am a Software Engineer and Applied Physicist.
I love complex problems because they come with structure, constraints, limitations, interactions - it always helps me remember, understand, manipulate and solve the problem with a limited number of principles and rules helping me build solution capable to reduce the complexity of the problem.

I love logic, humanism, and ethics.
I like to follow politics of USA and especially congressional/senate hearingsSmile | :) .
I like to plant new trees in the large garden around the family house and in recent years I learned how to successfully grow roses.


www.linkedin.com/in/ipavlu
Jay Kang
Korea (Republic of) Korea (Republic of)
No Biography provided
Kamran Bigdely-Shamloo
Engineer
Canada Canada
I develop virtual reality applications.
LiYS
Software Developer
China China
TBD
Marc Clifton
Architect Interacx
United States United States
Blog: https://marcclifton.wordpress.com/
Home Page: http://www.marcclifton.com
Research: http://www.higherorderprogramming.com/
GitHub: https://github.com/cliftonm

All my life I have been passionate about architecture / software design, as this is the cornerstone to a maintainable and extensible application. As such, I have enjoyed exploring some crazy ideas and discovering that they are not so crazy after all. I also love writing about my ideas and seeing the community response. As a consultant, I've enjoyed working in a wide range of industries such as aerospace, boatyard management, remote sensing, emergency services / data management, and casino operations. I've done a variety of pro-bono work non-profit organizations related to nature conservancy, drug recovery and women's health.
marcusts
Software Developer (Senior) Marcus Technical Services, Inc.
United States United States
I have been designing and coding software applications for 25 years.

Lately I have been obsessing about Xamarin.

If you enjoy my articles, send some work my way: marcus@marcusts.com.
Member 11896794
Software Developer Microsoft
China China
I started my programming career on .NET platform in early 2015. I have done many local and overseas application from scratch Currently I am working as Software Engineer at Microsoft Azure Team. I have couple of articles on Code Project and csharp corner. I occasionally post questions and answers on stackoverflow. My passion is to learn new technology through the professional approach.
Member 4201813
Unknown
No Biography provided
MilanGohil
Technical Lead
India India
No Biography provided
No Biography provided
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?
PIEBALDconsult
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

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

"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
raddevus
Software Developer (Senior) RADDev Publishing
United States United States
Roger has worked in IT for over 25 years in numerous roles (Technical Support, Quality Assurance, Capacity & Performance Engineering and Software Development).
During that time, he has recognized that software often just becomes another layer of work that the user has to wade through.
Sometimes technical documentation is like that too: so confusing and complex that it wastes developers' time.
That's why when he writes his books like Programming Windows 10 Via UWP and his articles (Practical Electronics For Makers) he strives to explain things in the shortest available space with the simplest language possible. Often that means, writing in a tutorial style with numerous images to help guide the user.
He believes the best guiding principle is Einstein's famous quote: "Everything should be made as simple as possible, but not simpler."
Sameh Abdel Mongy
Software Developer ATI Systems
Egypt Egypt
This member doesn't quite have enough reputation to be able to display their biography and homepage.
Sean Rand
Tester / Quality Assurance
United States United States
No Biography provided
Sem Shekhovtsov
Software Developer (Senior)
Ukraine Ukraine
Individual software developer, good experience with PHP, Java, .Net, NodeJs, Ruby on Rails, JavaScript, LESS, CSS3, HTML5, jQuery, CoffeeScript, ExtJS, Backbone, AngularJS, AJAX, Amazon s3 services, Azure. Programming is not just my work, but more like a hobby. I'm glad to learn new pattern and technologies, making research and study new things. I work remotely for couple of years. More than nine years I'm writing commercial projects.
Sergey Alexandrovich Kryukov
Architect
United States United States
No Biography provided
Sudip Bhakta
Software Developer Koch Technology Center
India India
I am a .Net developer having almost 3 years of experience. I love learning new technologies and build cool stuffs. Currently I am working on IoT projects. I am open for communication and freelancing jobs. Current I am working as Software Engineer.
syed shanu
Team Leader
India India
Microsoft MVP | Code Project MVP | CSharp Corner MVP | Author | Blogger and always happy to Share what he knows to others. MyBlog

My Interview on Microsoft TechNet Wiki Ninja Link
Victor Dashevsky
United States United States
Columbus, OH
vnmatt
Software Developer (Senior) Freelancer
Australia Australia
No Biography provided
Wade Harvey
Software Developer IdealProgrammer.com
United States United States
My name is Wade Harvey. I have been in the programming field for thirty years. I have a blog at http://idealprogrammer.com and a website at http://idealautomate.com My github repositories are located at: https://github.com/harvey007y In addition to enjoying programming, I also have a background in psychology and philosophy.

One of the things that I have learned from philosophy is that what makes things good is how well they match up to their ideal. One ethicist I studied in philosophy was named Robert Hartman. Hartman applied Field Theory to values.

In a field, there are two poles. This situation of there being two poles is often referred to as being "bipolar." In the field of values, the two poles are the actual object and the ideal.

According to Hartman, the tension that we feel between the actual and the ideal object is similar to the tension that exists between the two poles of a magnet. This tension exists not only between actual objects and ideal ones, but also between our actual self and our ideal one. When we take action to transform the actual into the ideal, we are able to reduce the tension that exists between the two.
Yisrael Lax
United States United States
No Biography provided

Contest Entries and Requirements

  1. The contest period covers the the first day of the month 12AM US Eastern Standard Time and ends the final day of the month at 11:59:59 PM US Eastern Standard Time. All entries must be submitted during this period in order to qualify.
  2. Entries must be an article, or blog entry.
  3. With the exception of the Everything Else category, the article must be tagged with at least one of the tags corresponding to that competition's category (for example, to enter the C# Competition you would need to tag your article with a C# tag).
  4. Articles entries must follow the CodeProject submission guidelines.
  5. No cheating, lying, plagiarizing articles, chicanery, or kicking.
  6. Articles may only be considered for a single category. If an article is eligible for multiple categories (for example, it pertains to both the C# and Web Dev categories), CodeProject editors and judges will decide which category the article shall be entered in.
  7. No author can be nominated twice in the same category.
  8. If an author writes has two separate articles, each article may be considered in their respective categories provided none of the aforementioned rules are broken. For example, if an author wrote two separate articles, one related to C# and one related to VB.NET, the author and articles could be nominated in the C# and VB.NET competitions, respectively.
  9. In the event an author wins multiple competitions, and repeat, identical prizes, the number of prizes issued is solely at the discretion of the prize issuer.
  10. In the event an article has multiple authors and/or contributors, the number of prizes issued is solely at the discretion of the prize issuer.
  11. In the event of a tie,  the number of prizes issued is solely at the discretion of the prize issuer.
  12. Multiple votes from the same IP will be automatically disqualified.
  13. The judges’ decision is final and no correspondence will be entered into.
  14. Only those who live in jurisdictions in which this contest is legal may enter.
  15. Any breach of the rules and the prize will be awarded to the runner up.
  16. By entering the contest you agree to the rules, conditions of entry, and agree that your member alias and any submitted material can be used for promotional purposes by CodeProject.
  17. Entries shall be deemed to be submitted by the authorized account holder of the email address submitted at the time of entry unless clearly indicated otherwise. "Authorized account holder" is defined as the natural person who is assigned to an email address by an internet access provider, on-line service provider, or other organization (e.g. business, educational institution, etc.) that is responsible for assigning email addresses for the domain associated with the submitted email address.

Eligibility

This competition is open to software development professionals & enthusiasts who are of the age of majority in their jurisdiction of residence; however, residents of Quebec and of the following countries are ineligible to participate due to legal constraints: Cuba, Iran, Iraq, Libya, North Korea, Sudan, and Syria. Employees (or a member of their immediate family) of CodeProject or any of their affiliates, subsidiaries, advertising or promotional agencies are also ineligible to participate. Void where prohibited by law.

How to Enter

Entry is by the submission process described above. Please read the submission requirements before submitting your entry and ensure the article is tagged with at least one of the tags corresponding to that competition's category.

Lost, late, misdirected, or illegible entries will be disqualified. Any entry containing content that CodeProject deems objectionable for any reason will be disqualified. All decisions of CodeProject with respect to any aspect of the competition, including, without limitation, the eligibility of entries, are final and binding on all entrants in all matters as they relate to this competition. CodeProject reserves its right to modify the Rules.

CodeProject assumes no responsibility for lost, late, delayed, destroyed or misdirected mail, voice messages, email or any computer errors or malfunctions. No correspondence will be entered into with entrants.

CodeProject does not assume any responsibility for incorrect or inaccurate capture of entry information, technical malfunctions, human or technical error, lost, delayed or garbled data or transmissions, omission, interruption, deletion, defect or failures of any telephone or computer line or network, computer equipment, software or any combination thereof. Entry materials/data that have been tampered with or altered are void. If for any reason, in the opinion of CodeProject in its sole discretion, the competition is not capable of running as originally planned, or if the administration, security, fairness, integrity or the proper conduct of the competition is corrupted or adversely affected, including by reason of infection by computer virus, bugs, tampering, unauthorized intervention, fraud, technical failures or any other causes beyond its control, CodeProject reserves its right to cancel, terminate, modify, amend, extend or suspend the competition including cancelling any method of entry, and select a winner from previously received eligible entries. CodeProject reserves its right in its sole discretion to disqualify any individual it finds to be tampering with the entry process or the operation of the competition or to be acting in violation of the Rules or otherwise in a disruptive manner. CodeProject reserves its right to seek remedies and damages to the fullest extent of the law for any attempts to deliberately damage the competition web site or to undermine the legitimate operation of this competition. CodeProject shall not be held responsible for any errors or negligence that may arise or occur in connection with the competition including any damage to an entrant's computer equipment, system, software or any combination thereof, as a result of their participation in this competition or from downloading any material from the competition website where applicable.

You must sign in to participate in this contest.
This contest has ended.
1 Apr - 30 Apr 2018