Csharp/CSharp Tutorial/Preprocessing Directives/warning

Материал из .Net Framework эксперт
Перейти к: навигация, поиск

Unused Warning With Warning Suppressed

using System;
using System.Collections.Generic;
using System.Text;
using System.ruponentModel;
    class UnusedWarningWithWarningSuppressed
    {
#pragma warning disable 0169
        int x;
#pragma warning restore 0169
    }

warning preprocessor

The #warning directive produces a warning.

The general form of the #warning directive is


#warning warning-message