UnitConverter.Convert(string,decimal,string) - YiZhang-Paul/Mock_Up_Calculator GitHub Wiki
Namespace: ConverterClassLibrary
Description: Converts one unit with given value to another unit.
Parameters | Description |
---|---|
current<string> | current measuring unit |
value<decimal> | value in current measuring unit |
target<string> | target measuring unit of conversion |
Returns | Description |
---|---|
decimal | value in target measuring unit after conversion |
Examples:
//needs concrete implementation in sub-classes
Console.WriteLine(converter.Convert("Hours", 8, "Minutes")); //480
Console.WriteLine(converter.Convert("Gradians", 5, "Radians")); //0.0785