Okapi .NET Library

Routines.GetPercentage Method 

 [This is preliminary documentation and subject to change.]

Calculates a percentage value.

[Visual Basic]
Shared Public Function GetPercentage( _ 
   ByVal p_nPart As Long, _ 
   ByVal p_nTotal As Long _ 
) As Integer
[C#]
public static int GetPercentage(
   long p_nPart,
   long p_nTotal
);
[C++]
public: static int GetPercentage(
   __int64 p_nPart,
   __int64 p_nTotal
);
[JScript]
public static function GetPercentage(
   long p_nPart,
   long p_nTotal
): int;

Parameters

p_nPart
The part of the total.
p_nTotal
The total.

Return Value

The percentage of p_nPart in p_nTotal.

Remarks

If p_nTotal is 0 the function returns 1.

See Also

Routines Class | Okapi.Library.Base Namespace