In this post let us try to explore what is static keyword in C#
Definition of static keyword
As per MSDN, “Use the static modifier to declare a static member, which belongs to the type itself rather than to a specific object.”
So it means that static keyword should be used with types which provide generic functionality and it doesn’t make sense to create objects of that type. For example, consider the System.Math class in c#. It provide various mathematical functions which can be used in the code as...
↧