Hi I am fairly new to C#, but studied one module of VB at university..
now i have grabbed the concepts of classes, inheritance, constructors etc..
but what i am struggling with is the definition and using of Static. Am i right in thinking static variables and methods do not need initialised, and can only call variables from their own class?
what confuses me is that I see a lot of tutorials and examples initialising class variables / properties from other classes within a STATIC Void MAIN method.. Which is confusing as i thought that static methods could only call static variables / methods..
can anyone explain this in lehman terms for me about static variables, methods and things like that.
now i have grabbed the concepts of classes, inheritance, constructors etc..
but what i am struggling with is the definition and using of Static. Am i right in thinking static variables and methods do not need initialised, and can only call variables from their own class?
what confuses me is that I see a lot of tutorials and examples initialising class variables / properties from other classes within a STATIC Void MAIN method.. Which is confusing as i thought that static methods could only call static variables / methods..
can anyone explain this in lehman terms for me about static variables, methods and things like that.