Quantcast
Channel: Programming Forums
Viewing all articles
Browse latest Browse all 51036

static confusion - methods and rules

$
0
0
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.

Viewing all articles
Browse latest Browse all 51036

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>