private static or static private in a field declaration?

  • Thread starter Thread starter Charlie@CBFC
  • Start date Start date
C

Charlie@CBFC

Hi:

I'm looking at some field declarations. Programmer has it static private
int x. Shouldn't it be private static int x? Doesn't the access modifier
come before variable modifier? But it compiles. How does this work?
Please explain.

Thanks,
Charlie
 
Charlie@CBFC said:
Hi:

I'm looking at some field declarations. Programmer has it static private
int x. Shouldn't it be private static int x? Doesn't the access modifier
come before variable modifier? But it compiles. How does this work?
Please explain.

C# doesn't care which is used but I think private static is the usual.

Michael
 
Back
Top