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

  • 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...
  • 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...
  • Best Practices No 5: Detecting .NET application memory leaks

    In this article we are going to detect the .NET application memory leaks.
  • 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.
  • 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.
  • 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...
  • 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.
  • 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.
  • How To Write Effective Code

    How To Write Effective Code. The key to writing effective code is Delete Unnecessary Code, use clean code, learn coding from masters, Meaningful Code Commenting, Debug code and Trace, Unit Testing,...
  • How To Improve Execution Performance Of An Application

    For every application could be small or medium or a big enterprises application the major non-functional requirement will be a good code performance. In some cases, companies will hire a special te...
  • 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.
  • Git For Absolute Beginners With Command Line Interface

    Explore Git via CLI like programmers, and learn black magic done by Git GUI clients.
  • Best Practices Of Writing C# Code

    Anyone can write code with a few months of programming experience. But some developers know the coding standard and naming convention but not everyone follows the best practices
  • 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 ...
  • How To Implement TDD In C# Using NUnit Testing With NInject DI

    How to implement TDD (Test driven development) in c# (Csharp) using Nunit testing with NInject DI?
  • Defensive Programming - Let Type Checking Work For You

    Since I have been a speaker and a teacher, I have always stressed the importance of practicing proper object-oriented programming (OOP) techniques. If you don’t practice OOP, no matter what languag...
  • Five Easy Rules For Your Source Control Repository

    I have been using source control programs for a very long time. I believe the first one was Visual Source Safe (don’t laugh, it was a painful experience). Early in my career and throughout I have l...
  • 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.
  • SQL Coding Best Practices

    While executing your procedure, the system will first scan through all system procedures and then user defined procedures. This means that the procedure might take more time for execution thus decr...
  • Beautifying C# Code - Part II

    In this video, how we can beautify\reduce number of lines in your C# Code.
  • Beautifying Your C# Code - Part I

    In this video, how we can beautify\reduce the number of lines in your C# code.
  • 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.
  • Code Metrics Cyclomatic Complexity

    Let's learn about Code Metrics Cyclomatic Complexity in this write-up.
  • Some Real Differences Between Structures and Classes

    This article lists some differences between classes and structures.
  • 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...
  • View More