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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top