Module Module1
Class Area
Private r As Double
Public Sub New(ByVal temp As Double)
r = temp
End Sub
Public Function getArea() As Double
Return Math.PI * MathPow(r, 2)
End Function
End Class
Sub Main()
Dim a As New Area(5.0)
Console.Write("Area of Circle :{0}", a.getArea())
Console.ReadKey()
End Sub
End Module
Error 1 'MathPow' is not declared. It may be inaccessible due to its protection level. C:\Users\PRANAY\AppData\Local\Temporary Projects\ConsoleApplication1\Module1.vb 17 30 ConsoleApplication1
ReplyDelete