Why do we need to create static methods? i didnt understand the use of it? just to avoid creating instance of it so that it can be called using Class name?
4:25 thru 4:55, where the only way you could call the methods is by explicitly saying StaticClassName.StaticMethodName() That was true when you said it, but since then they added a "using static packagename.ClassName.MethodName right? Not that is necessarily better, since you don't really see where it comes from.
+Amel Salibasic Yea, pretty much. With managed code in .NET, the details are a bit different. Once the JITter compiles the code to machine code, however, yes, that's absolutely true.
So you can access static functions in another class without that class declared as static?
Loved the way u teach
Why do we need to create static methods? i didnt understand the use of it? just to avoid creating instance of it so that it can be called using Class name?
4:25 thru 4:55, where the only way you could call the methods is by explicitly saying StaticClassName.StaticMethodName()
That was true when you said it, but since then they added a "using static packagename.ClassName.MethodName
right?
Not that is necessarily better, since you don't really see where it comes from.
So everything that is static(variables, classes, references) is created on compile time, before runtime? Aha?
+Amel Salibasic Yea, pretty much. With managed code in .NET, the details are a bit different. Once the JITter compiles the code to machine code, however, yes, that's absolutely true.