dotnet-Snippets.com
Snippets: 61 | Registered User: 61 | Visitors online: 10
Main Menu

Home
Random Snippet
FAQs
Contact Us
Imprint
RSS Feeds

Rss All languages
Rss C#
Rss VB.NET
Rss C++
Rss J#
Rss ASP.NET
Google Ads

Sri Lanka .NET 
                Forum Member
Basic Circle Calculation

Author: Tim Hartwig
Programming Language: VB.NET Rating:
not yet rated

Views: 2212

Description:

A little Class for basic circle calculation



Visual Basic
1
2
3
4
5
6
7
8
9
10
11
12
13
Public Class Circle
    Public Shared Function GetCircleLength(ByVal Diameter As Double) As Double
        Return Diameter * Math.PI
    End Function

    Public Shared Function GetCircleArea(ByVal Radius As Double) As Double
        Return Math.Pow(Radius, 2) * Math.PI
    End Function

    Public Shared Function GetCircleDiameter(ByVal Area As Double) As Double
        Return Math.Sqrt((Area / Math.PI))
    End Function
End Class

This Snippets could be interesting for you:

Poor Excellent
1 2 3 4 5 6 7 8 9 10
Sign in to vote for this snippet.

Comments:
(Please log in to wrtite an comment.)