I saw a question on this page https://www.toptal.com/c-sharp/interview-questions tryed to implement it in VS, here is is my full code:
public class TopTalInterviewQuestions
{
//write code to calculate the circumference of the circle, without modifying the Circle class itself.
Circle myCircle = new Circle();
myCircle.??? // here VS does not help me
}
public sealed class Circle
{
//public Circle() { }
private double radius;
public double Calculate(Func<double, double> op)
{
return op(radius);
}
}
Why i cant instantiate it and call the "Calculate" method? Please. explain it for a beginner.