c# static meaning
In general, static means “associated with the class, not an instance”.
// Search c# static review for more detail
c# static meaning
In general, static means “associated with the class, not an instance”.
// Search c# static review for more detail
what is using static in c#
// The using static directive designates a type whose static
// members and nested types you can access without specifying a type name.
using System;
using static System.Math;
public class Circle
{
public Circle(double radius)
{
Radius = radius;
}
public double Radius { get; set; }
public double Diameter
{
get { return 2 * Radius; }
}
public double Circumference
{
get { return 2 * Radius * PI; }
// otherwise if not using static "get { return 2 * Radius * Math.PI; }"
}
public double Area
{
get { return PI * Pow(Radius, 2); }
// otherwise if not using static "get { return Math.PI * Math.Pow(Radius, 2); }"
}
}
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us