Skip to content

Instantly share code, notes, and snippets.

@vicro
Created May 8, 2018 02:39
Show Gist options
  • Save vicro/986a6ccfc791fc323d70963c6a7cd450 to your computer and use it in GitHub Desktop.
Save vicro/986a6ccfc791fc323d70963c6a7cd450 to your computer and use it in GitHub Desktop.
C# disable the "Field is never assigned to..." warning sample
// Disable "Field is never assigned to..." compiler's warning. Justification: the field is assigned by MEF.
#pragma warning disable CS0649
/// <summary>
/// Classification registry to be used for getting a reference
/// to the custom classification type later.
/// </summary>
[Import]
private IClassificationTypeRegistryService classificationRegistry;
#pragma warning restore CS0649
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment