jkjsha ahsa

jkjsha ahsa

  • NA
  • 24
  • 26.1k

about class variables

Nov 3 2009 6:43 PM
i want to know if there is code i write befor class variables to make them all public or private or any access modifir
like this in c

class example
{
   public{ string m;
                int num;
             } // m and num are public
 }

this code is easir than these in c # as i write public once

the same code in c#:

class example{
 
public string m;
public int num;
                       }


in brief i want to know if there is code in c# don't make me to write the access modifier like "public" more than one time

Answers (4)