Sunday, November 1, 2015

C# what does static mean

C# can be intimidating and consists of several terms which addup to the pile of shit and one such term is static you've mostly seen it in "public static void main";

Best way to remember what it means is to remember it as a magic word which will allow you to access any method in any class without creating an instance of class.


To explain this I'll be creating a fun and simple program which will shout out your name back to you, its more fun cuz it'll shout back whatever you enter =D

In visual studio after you've created a new console application create a new class called shoutout.cs 



Now here I'll be showing you two examples one with static and one without static, so that you finally get to know the difference, (view in Fullscreen Click Here)






No comments:

Post a Comment