SelectCaseBlockValue_

Public Function SelectCaseBlockValue_()

Can be used in a select-case block to get the value of the used expression. Can be specifically useful if the case is using a more complex expression to prevent re-calculating the expression (and to keep it in only one place in your code).

Select Case pSum / pCount
Case 0
   Return "Average is Zero"
Case Else
   Return $"The average is not zero ({SelectCaseBlockValue_})"
End Select