C# Code Review: Reviewing Practice Code – How To Practice C# Well

Practicing what you learn is paramount. I don’t consider a topic really understood until I have actually built something with it. But how do you come up with all of these practice projects? My recommendation is to make applications that are just for practice. They don’t need to do anything “real”. Instead, they allow you to practice the specific thing you are learning. In this video, we will do a code review of just such a project. We will look at how the code works, how it could be better, and how to make great practice projects.

Full Training Courses: https://IAmTimCorey.com
Source Code: https://leadmagnets.app/?Resource=CodeReviewPractice
Original GitHub Page: https://github.com/therealchriswoodward/Read-And-Write-To-A-File-Experiment

Patreon: https://www.patreon.com/IAmTimCorey
Mailing List: https://signup.iamtimcorey.com/


  1. For being clever, I definitely try to make things as simple as I can knowing that I will not be the only developer to maintain the code. It can be frustrating when looking someone else's code and it's more complicated than it needs to be. It hurts my eyes when looking at someone else's sql code that looks like a bunch of run on sentences. I've fixed many bugs with code like that because they inadvertently made Cartesian joins….

  2. Great information for learners. One suggestion I would have that you missed out on would be to put Try/Catch around the creating directory section at the top Maybe path in the string was pointing to Z drive which doesn't exist, or to a network drive that isn't connected, then checking / creating directory would throw an error.

    Though I do have a question – I've NOT used the new "cleaner" looking console way in .net 6.0 yet, if you don't have a "main", can you still create other private methods in there. This code is a perfect example of practicing breaking your code down into methods, e.g. the checking / creating directory, prompting the user, saving / loading the file, displaying the contents, The the MAIN program will only be about 5 lines long.

  3. Good Day Tim I love this VIDEO and the other posts regarding C#. NET DEV. THOUGH I'M A SENIOR C#. NET DEV, I'M REALY LEARNING NEW LESSONS AND MIRE. and not only that I CAN APPLY IT FOR WORK. THANKS A LOT ON THIS YOU ARE A GOD SENT TO US developer. 😁😁😁👍👍👍❤️❤️❤️

  4. My first professional application was to create a console application. Because I had only ever used a console app as a learning tool, I ended up with a terrible application based on practice tendencies. I would love for you to show how a professional console application is created. I.E. Passing the Folder and file name as external parameters where in the real world these would not be hard coded in the codebase.

  5. Hi @Tim Corey, I wanted to know how we can use EF CORE dbContext in a class library. How do i create and use dbContext in a class library.

  6. Thank you for yet another awesome video. For me, a video about how to learn from Microsoft docs would help me alot. I tend to get lost in there and not quit getting to the source of the problems i try to solve.

  7. Excellent code review. But what I like the most is the way you address each item positively. This talent is not given to everyone. This is learned by observing others.

  8. I almost wish I could submit my code for review. I think that the feedback would be beneficial. The idea also makes me uneasy.
    Partialy it would be a reflection of what I've learned from this chanel. Or rather what I did not learn. 🙂
    I've writen small wpf app in c# some time ago. It does what it needs. I like it.

  9. Almost positive that the try block is a scope. I know if I need access to something outside the try block, I have to declare it outside the block.

  10. We are a team switching from vb to c#. I shared this to team members not familiar with c#. I also just watched how to increase your teams tech skills. I’m hoping to implement ways for everyone to grow. I have talked about trying to get some of them to go to conferences to energize them. We have multiple over 40 developers who just want to focus on our products.

  11. I have one question about do loops. I always thought that best practices is to have the do with no conditions. Then in the code where needed, then if a condition is true, then break. That way is actually much more flexible because instead of checking at beginning or end, a person has full choice of where they check to see if it should continue and if not break. That is much easier to understand even.

Leave a Reply

© 2023 53GB