public class Test
public Shared Sub Main
Dim area As Double
area = CalculateAreaFromRadius(100)
Console.WriteLine(area)
End Sub
Shared Function CalculateAreaFromRadius(ByVal radius As Double) As Double
Dim radiusSquared As Double
radiusSquared = radius * radius
Dim result As Double
result = radiusSquared * Math.PI
Return result
End Function
End class
|