Ok so it just affects the ToString() method?
I thought it affected the & and | operators.
"Miha Markic [MVP C#]" <miha at rthand com> wrote in message
news:uvWkM3x6DHA.1852@TK2MSFTNGP10.phx.gbl...[color=blue]
> Hi,
>
> No.
> FlagsAttribute has influence only on output, check this code (toggle the
> Flags attribute to see the difference):
> class Class1
>
> {
>
> [Flags]
>
> public enum Flagator
>
> {
>
> One = 1,
>
> Two = 2
>
> }
>
> [STAThread]
>
> static void Main(string[] args)
>
> {
>
> Flagator ft = Flagator.One | Flagator.Two;
>
> Console.WriteLine(ft.ToString());
>
> Console.ReadLine();
>
> }
>
> }
>
>
> --
> Miha Markic [MVP C#] - RightHand .NET consulting & software development
> miha at rthand com
>
www.rthand.com
>
> <discussion@discussion.microsoft.com> wrote in message
> news:ODvFBqx6DHA.3288@TK2MSFTNGP11.phx.gbl...[color=green]
> > If I dont specify the [Flags] attribute on an enum to be used as a[/color]
> bitfield[color=green]
> > declared as 0,1,2,4,8... and so on, and use it as one normally would[/color][/color]
with[color=blue]
> |[color=green]
> > and & operators, would it behave differently?
> >
> >[/color]
>
>[/color]