Top 10 C# Best Practices (plus bonuses)

Share
Embed
  • Loading...
  • Published on:  Monday, December 19, 2016
  • To sign up for announcements about new videos and exclusive discounts, fill out this form: https://signup.iamtimcorey.com/ (your email will be kept safe and you will not be spammed).

    Learn what I believe are the top 10 best practices for C# developers. When you are programming in Visual Studio, I think these will help you do so better, more efficiently, and with less bugs. Once you see all 10 (plus the bonuses at the end), let me know what you think in the comments. Did I miss one? Do you disagree with one?

    Thanks to Ralfs K and Julio M, here is a list of the best practices along with their video times:
    0:00 - Intro
    0:50 - Name things well
    7:51 - One class per file
    10:18 - Use properties not variables
    12:57 - Methods should do one thing
    23:27 - Keep it simple
    28:21 - Be consistent
    32:22 - Use curly braces for if statements
    37:45 - Concatenate strings using $""
    45:37 - Avoid global variables
    48:39 - Use public modifier only when necessary
    50:54 - Never trust the user (bonus)
    52:24 - Plan before you build
    55:31 - Concluding remarks
  • Source: https://youtu.be/-9b8NRqjUFM
Loading...

Comment