Created
June 22, 2021 16:37
-
-
Save pfrozi/edaf8429e1d7c6524c82c453853dee2d to your computer and use it in GitHub Desktop.
Revisions
-
pfrozi created this gist
Jun 22, 2021 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,20 @@ using System; public class Program { public static void Main() { var e = Teste.Cliente | Teste.Documentos; Console.WriteLine(e.HasFlag(Teste.Cliente)); Console.WriteLine(e.HasFlag(Teste.Liberacoes)); Console.WriteLine(e.HasFlag(Teste.Documentos)); } [Flags] public enum Teste { Cliente = 1 << 0, Liberacoes = 1 << 1, Documentos = 1 << 2, } }