A Software Engineer's Blog by Brandon D'Souza
© 2024 Code-Sage.com. All rights reserved.
C# language feature:
applies to
benefit
static
how to use
example:
public static class Static_Class_Circle_Example { public static double AreaFromRadius(double radius) { return 3.14*radius*radius; } } public class Use_of_Static_Class_Example { public void use_static_class_method(){ // no need to declare and instantiate a variable of Static_Class_Circle_Example System.Console.WriteLine(Static_Class_Circle_Example.AreaFromRadius(5)); } }