Every now and again, the compiler will throw a warning message for a known issue. For example, some member variable may be set by reflection or an ORM tool like NHibernate. Using the pragma directive can easily solve these issues.
public class PragmaExample
{
#pragma warning disable 0649
private int neverSetVariable;
#pragma warning restore 0649
}
To figure out what warning to disable, just right click on the warning.
Then click on Show Error Help, which will bring up a dialog where you should select to view to show online help. Then the online help will have the error description, as well as the error number.
This four digit error number, 0169, can be replaced in the pragma statement to skip this specific warning. Enjoy.
Thanks to Kirk Evans Blog, which helped me understand how all this works.