dotnet-Snippets.com
Snippets: 57 | Registered User: 27 | Visitors online: 42
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
Get Percent Value

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

Views: 737

Description:

Calculates the Percentvalue of a given value depending on a maximum value.



Visual Basic
1
2
3
Public Function Percent(ByVal CurrVal As Long, ByVal MaxVal As Long) As Integer
    Return Int(CurrVal / MaxVal * 100 + 0.5)
End Function

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.)