constructor - How to call static variable from another form c#? -
i have mdi parent , few child forms. want declare static variable in mdi parent form, , 'call' child forms.
in particulary want start 0 (zero) , eventualy give value 1 or 2.
this way declared static variable, , want know code ok, , if not wrong.
static class permission { static int role; public static int getpermission() { role = 0; return (role); } }
the second , more important question how call static variable inside child form(s). code should write , ?
thank all.
you call via permission.getpermission();
anywhere within same project (as it's defaulted internal class).
Comments
Post a Comment