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.

Blogs

  • Best Coding Practices - Part One

    This blog sums up a few best practices while naming a variable/ method/ class.
  • C# Programming Performance Tips - Part One - String Split

    In this blog, we will see the usage of String.Split method in a optimized way.
  • 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.
  • C# Programming Performance Tips - Part Three - Adding Strings

    In this blog, we will see a better way of adding two or more string variables.
  • 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().
  • 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.
  • C# Programming Performance Tips - Part Six - Array Length

    In this blog, we will see how to use Array.Length before iterating an array.
  • 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.
  • 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.
  • 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.
  • 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.
  • Performance Tip - Checking For Empty String

    In all my books and conference sessions I talk about the proper way to test if a string is valid. Microsoft .NET has been around for almost two decades.
  • Seven Tips To Increase Your Productivity

    Writing a robust code and finishing the project in a short time are the main characteristics of a professional job, so every developer should focus on his/her productivity to create efficient code in a short time.
  • 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.
  • Validation Response Pattern

    An interface based pattern to return the appropriate business logic validation outcome.
  • Effective Application Development

    In this blog I would like to share some of my Application Development methodologies which give some more productivity in development.
  • How To Learn A New Computer Programming Language

    This article is about learning a new programming language
  • Five Golden Rules For Better Programming

    Five Golden Rules For Better Programming.
  • Web Application Solution Architecture Naming Conventions

    In this blog, you will be acquainted with Web Application Solution Architecture naming conventions.
  • 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.
  • View More