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
About class variables
4 Answers
Know the answer? Post it. Somebody with the same question will find it here.

Kirtan PatelRank #292 · 8.6K reputationPosted Nov 3, 2009, 3:05 PM EST
jingeRank #2,527 · 554 reputationPosted Nov 3, 2009, 6:36 PM EST
jingeRank #2,527 · 554 reputationPosted Nov 3, 2009, 6:43 PM EST
Posted Nov 3, 2009, 8:21 PM EST
Ex:
Private DateHired As Date, HourlySalary As Double In c# i don't know..just trying. Sorry if i am wrong ..Hope it helps.....