From the course: Ten Tips for the C# Developer

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Discard feature

Discard feature - C# Tutorial

From the course: Ten Tips for the C# Developer

Start my 1-month free trial

Discard feature

- [Instructor] We are looking at C# tips in this course. As a new C# programmer, you quickly learn that C# is a compiled language, and that means that you need to compile your code before you can work with it. So in Visual Studio, you would go to the Build menu and choose Build. This will do multiple steps including compile your code. In my case, I compiled successfully, but in the real world, of course, you will make mistakes in your C# syntax, and you'll get compiler errors, and you need to fix those before you can successfully compile your code. Another thing you learn as a novice C# programmer is that Visual Studio will make suggestions on when you can improve your code, like I'm seeing here on line 13. I've got this integer variable. I have assigned a value of 10 to that variable. And I'm not using that variable in my code, so the editor is telling me with this screen squiggle that this variable is assigned, but…

Contents