Guest User

Untitled

a guest
Jul 17th, 2018
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
  2. {
  3. if (value == null)
  4. return "--";
  5.  
  6. if (!double.TryParse(value.ToString(), out double doubleValue))
  7. {
  8. return "--";
  9. }
  10. else
  11. {
  12. doubleValue = doubleValue / 1000;
  13. return Math.Round(doubleValue, 1).ToString() + " Km";
  14. }
  15. }
Add Comment
Please, Sign In to add comment