Coding Best Practices
Welcome to Performance & Best Practices section of C# Corner. In this section, you will find various Performance & Best Practices related source code samples, articles, tutorials, and tips.


  • Sateesh Arveti

    Beautifying Your C# Code - Part I

    In this video, how we can beautify\reduce the number of lines in your C# code.
    Sateesh Arveti Jan 24, 2018
  • Ajay Mor

    Rules To Write Clean And Good Unit Tests

    Unit tests should be fast and run quickly. If they won't, then we won't want to run them frequently.
    Ajay Mor Jan 17, 2018
  • Sagar Shinde

    Code Metrics Cyclomatic Complexity

    Let's learn about Code Metrics Cyclomatic Complexity in this write-up.
    Sagar Shinde Dec 28, 2017
  • Gaurav Gahlot

    When To Use "Var" As A Type

    It has been quite a long time since "var" was introduced, yet it is still a topic of debate among .net developers.
    Gaurav Gahlot Aug 15, 2017
  • Bechir Bejaoui

    Some Real Differences Between Structures and Classes

    This article lists some differences between classes and structures.
    Bechir Bejaoui Aug 04, 2017
  • David Mccarter

    Confessions Of An Angry Programmer

    Recently, after doing the keynote session about code quality at a conference in Denver, I received a comment from one of the attendees. He said my session was “too much angry coder”. After receivin...
    David Mccarter Jul 23, 2017
  • Pankaj Sapkal

    Best Practices For MVC

    Add a class library project to the solution, named Store.Model. This library is where we ‘ll keep all of our domain objects. Entity Framework will count on them in order to build the database but w...
    Pankaj Sapkal Jul 14, 2017
  • David Mccarter

    My Workflow Before I Submit Code Changes

    In this article, you will learn about my Workflow before I submit code changes.
    David Mccarter Jun 26, 2017
  • Sundar

    Effective Application Development

    In this blog I would like to share some of my Application Development methodologies which give some more productivity in development.
    Sundar Jun 20, 2017
  • Gul Md Ershad

    A Day With A Software Engineer Who Changes Text Labels Only

    This article will explain the way Software Engineers, who never focus on technical learning and remain busy in text label changing only.
    Gul Md Ershad Jun 16, 2017
  • Saravanan V

    Validation Response Pattern

    An interface based pattern to return the appropriate business logic validation outcome.
    Saravanan V Jun 12, 2017
  • Sahil Sharma

    How To Write Effective Code

    How To Write Effective Code.
    Sahil Sharma Jun 12, 2017
  • Sundar

    How To Learn A New Computer Programming Language

    This article is about learning a new programming language
    Sundar Jun 09, 2017
  • Hr Rony

    Stop Using VAR Everywhere And Think Before Using Underscore With Private Variable In C#

    When to use underscore(_) or not with the private member variable; why we shouldn't use var everywhere; when must we use 'var'; when can't 'var' be used. Why we need to foll...
    Hr Rony Jun 08, 2017
  • Nilesh Shah

    Five Golden Rules For Better Programming

    Five Golden Rules For Better Programming.
    Nilesh Shah Jun 02, 2017
  • Afzaal Ahmad Zeeshan

    Functions In Functional Programming Vs Procedural Programming

    In this article, I will show you what a basic function is and the concept of the function, as it is used in functional programming and how procedural (or imperative) languages might take them wrong.
  • Saravanan V

    Web Application Solution Architecture Naming Conventions

    In this blog, you will be acquainted with Web Application Solution Architecture naming conventions.
    Saravanan V May 10, 2017
  • Biswabid Rath

    Bench-marking List vs Dictionary vs HashSet vs SortedSet

    It is always wise to evaluate the performance of datatypes before using it. It will save developer from last minute design change/ code change to address critical issues such as performance / memory.
    Biswabid Rath Apr 19, 2017
  • Bryian Tan

    Coding Challenge - Lesson Learned

    Here, I am sharing some note from the coding challenge: NumberStyles, Tuple, Generic Extension Method, Group string from right to left.
    Bryian Tan Feb 22, 2017
  • Duggu Sharma

    Why Comments Are Important While Writing Code

    This blog is about why comments are important and how they help to understand the code as well as when and where we should use comments.
    Duggu Sharma Feb 21, 2017
  • Gul Md Ershad

    Static Variable - A Code Smell

    This article will explain the disadvantages of Static variables.
    Gul Md Ershad Jan 16, 2017
  • Gul Md Ershad

    Branching Over A "Type Code" - A Code Smell

    This article will explain how the branching over a type code is a serious type of code smell.
    Gul Md Ershad Jan 13, 2017
  • Gul Md Ershad

    The Law Of Demeter

    This article will explain several pros and cons of the Law of Demeter.
    Gul Md Ershad Jan 12, 2017
  • Gul Md Ershad

    Pros And Cons Of Code Refactoring

    Code Refactoring is an important part of software development. This article will explain the benefits and drawbacks of code refactoring.
    Gul Md Ershad Jan 09, 2017
  • Gul Md Ershad

    Switch Statement - A Code Smell

    This article will explain the code issues, using the Switch.. case statement. In some cases, it is a type of code smell.
    Gul Md Ershad Jan 07, 2017
  • View More