yesNoToBool static method

bool yesNoToBool(
  1. Object val
)

Converts a 'Yes'/'No' string to a boolean value.

Parameters:

  • val: Object that should be 'Yes' or 'No' string

Returns true if val is 'Yes', false otherwise.

Implementation

static bool yesNoToBool(Object val)
{
  if(val as String  == 'Yes') {
    return true;
  }
  return false;
}