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.

RECENT POSTS

  • David Mccarter

    What Can Be Done To Make Code Quality Better

    In this article, you will learn what can be done to make code quality better.
    David Mccarter Dec 30, 2019
  • David Mccarter

    dotNetDave Says… If Your Code Is Hard To Unit Test, You’re Doing It Wrong

    Unit testing is something very important for any project. With that said, I rarely see it done in projects or done correctly. How can you push the code to quality assurance or production without kn...
    David Mccarter Oct 30, 2019
  • Dhanashri Zirape

    Best Coding Practices - Part One

    This blog sums up a few best practices while naming a variable/ method/ class.
    Dhanashri Zirape Jun 16, 2019
  • David Mccarter

    Code Quality Is A Feature, Not An Afterthought

    In this article you will learn that code quality is a feature, not an afterthought.
    David Mccarter Jun 10, 2019
  • Akshay Patel

    C# Programming Performance Tips - Part Six - Array Length

    In this blog, we will see how to use Array.Length before iterating an array.
    Akshay Patel May 16, 2019
  • Akshay Patel

    C# Programming Performance Tips - Part Five - List.Count() Vs List.Count

    In this blog, we will do the benchmarking for List.Count() method and List.Count property.
    Akshay Patel May 16, 2019
  • Akshay Patel

    C# Programming Performance Tips - Part Four - List.Count() Vs List.Any()

    In this blog, we will compare the execution time between List.Count() and List.Any().
    Akshay Patel May 16, 2019
  • Akshay Patel

    C# Programming Performance Tips - Part Three - Adding Strings

    In this blog, we will see a better way of adding two or more string variables.
    Akshay Patel May 16, 2019
  • Akshay Patel

    C# Programming Performance Tips - Part Two - String Equals

    In this blog, we will see how we can avoid null reference exception while using the String.Equals method.
    Akshay Patel May 16, 2019
  • Akshay Patel

    C# Programming Performance Tips - Part One - String Split

    In this blog, we will see the usage of String.Split method in a optimized way.
    Akshay Patel May 16, 2019
  • Bechir Bejaoui

    Some Real Differences Between Structures and Classes

    This article lists some differences between classes and structures. In this article, we will see what is the difference between a structure and a class.
    Bechir Bejaoui May 07, 2019
  • Atul Sharma

    All About OWASP #3 - Sensitive Data Exposure

    In this part of the study of OWASP Top 10 Threats, we will understand Threat # 3 – Sensitive Data Exposure.
    Atul Sharma Apr 24, 2019
  • Atul Sharma

    All About OWASP #1 - SQL Injection Attack

    Considering security as the most important aspect of an application and as the First step in SOUND Programming Methodology, we will be covering SQL Injection Attack and Prevention.
    Atul Sharma Apr 24, 2019
  • Atul Sharma

    All About OWASP #2 - Broken Authentication

    In this article, we will learn about Secure Programming of SOUND programming methodology. We will cover Broken Authentication from OWASP's top 10 security threats.
    Atul Sharma Apr 24, 2019
  • Atul Sharma

    An Effective Coding And Code Review Technique

    Coding and Code review are the most basic building blocks of any software product. Any lapse may severely affect the schedule, quality, and of course the cost. Not only in the review but a few issu...
    Atul Sharma Apr 02, 2019
  • Amit Tyagi

    Quick Tips For Writing Clean Code - Part Two

    This blog aims at writing clean code and avoiding some common mistakes that programmers usually make while writing code.
    Amit Tyagi Mar 25, 2019
  • Amit Tyagi

    Quick Tips for writing Clean Code Part-1

    This blog aims on writing clean code and avoid some common mistakes that programmers usually make while writing code.
    Amit Tyagi Mar 08, 2019
  • Saurabh

    Generics in C# 2.0

    In this article, I specifically talk about Generics and how they improve upon arraylists and how they solve the issues posed by ArrayLists.
    Saurabh Mar 05, 2019
  • Matthew Cochran

    C# Heap(ing) Vs Stack(ing) In .NET - Part Three

    Having a basic understanding of how memory management works will help explain the behavior of the variables we work with in every program we write. In this article we’ll cover an issue that arises...
    Matthew Cochran Jan 05, 2019
  • Shivprasad

    Best Practices No 5: Detecting .NET application memory leaks

    In this article we are going to detect the .NET application memory leaks.
    Shivprasad Dec 13, 2018
  • Mehreen Tahir

    Is Something Wrong With OOP?

    This blog will discuss a few critical points about OOP and we'll be seeing another way to define it.
    Mehreen Tahir Dec 11, 2018
  • Mehreen Tahir

    Ineffective Coding Habits - What To Avoid

    In this article, I'll be talking about some habits of programmers which are not so effective. We'll be looking into what to avoid and how to code effectively.
    Mehreen Tahir Nov 26, 2018
  • David Mccarter

    Presenting Code Samples With A Dark Theme...Please Do Not

    For all of you who code using apps like Visual Studio or VS Code, please don’t present code in a meeting or conference session using a dark theme! I know I am going to get a lot of push back from t...
    David Mccarter Nov 12, 2018
  • Karthikeyan Sekar

    Handling Arithmetic Overflow

    When you are dealing with integer values which are in higher amounts, you might arrive at a situation where the program gives you the wrong output.
    Karthikeyan Sekar Oct 30, 2018
  • Jiteendra Sampathirao

    String and StringBuilder Classes

    Here I'm going to tell you about what is String and StringBuilder and what the differences between String and StringBuilder classes.
  • View More