Q28
What is the correct syntax to define a method named CalculateArea that calculates the area of a rectangle with length and width parameters in C#?
A.
double CalculateArea(double length, double width) { return length * width; }
B.
CalculateArea(double length, double width) { return length * width; }
AnswerC.
double CalculateArea(length, width) { return length * width; }
D.
CalculateArea { double length * double width; }
Answer: Option B
Solution
Answer: Option B
No explanation is given for this question Let's Discuss on Board