There might be times when you want to ignore warnings, sometimes all in a piece of code, sometimes just some certain warnings. There are a few ways to do that, for the whole project you can for example set that in the properties of the project. For just parts of the code you can use preprocessor directives (read more about them here: Stupid Question 52: What are preprocessor directives? (In c#)
Use : #pragma warning disable 414, 3021 (numbers are for specific warnings, if blank all warnings are disabled) and use #pragma warning restore 3021
to restore certain warnings, all or just certain warnings.
Here is an example (Warning level 4, treat all warnings as errors):
Read more about the warning levels here: