MyFunctions.cs 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. using System;
  2. namespace UserFunctions
  3. {
  4. // In order to see xml comments in the FastReport designer, be sure to turn on "GenerateDocumentationFile" option in the project
  5. public static class MyFunctions
  6. {
  7. /// <summary>
  8. /// Converts a specified string to uppercase.
  9. /// </summary>
  10. /// <param name="s">The string to convert.</param>
  11. /// <returns>A string in uppercase.</returns>
  12. public static string MyUpperCase(string s)
  13. {
  14. return s == null ? "" : s.ToUpper();
  15. }
  16. /// <summary>
  17. /// Returns the larger of two 32-bit signed integers.
  18. /// </summary>
  19. /// <param name="val1">The first of two values to compare.</param>
  20. /// <param name="val2">The second of two values to compare.</param>
  21. /// <returns>Parameter val1 or val2, whichever is larger.</returns>
  22. public static int MyMaximum(int val1, int val2)
  23. {
  24. return Math.Max(val1, val2);
  25. }
  26. /// <summary>
  27. /// Returns the larger of two 64-bit signed integers.
  28. /// </summary>
  29. /// <param name="val1">The first of two values to compare.</param>
  30. /// <param name="val2">The second of two values to compare.</param>
  31. /// <returns>Parameter val1 or val2, whichever is larger.</returns>
  32. public static long MyMaximum(long val1, long val2)
  33. {
  34. return Math.Max(val1, val2);
  35. }
  36. }
  37. }