Boolean

Boolean class

Class that keeps static members of System.Boolean .Net type.

class Boolean

Methods

MethodDescription
static bool Parse(const String&)Converts the specified string to a value of bool type.
static bool TryParse(const String&, bool&)Converts the specified string to a value of bool type.

Fields

FieldDescription
static FalseStringString representation of ‘false’ boolean value.
static TrueStringString representation of ’true’ boolean value.

Remarks

#include <system/boolean.h>

using namespace System;

int main()
{
  // Create the boolean variable.
  bool isWeekend = false;

  // Parse the input string and print the result.
  if (Boolean::TryParse(u"True", isWeekend))
  {
    std::cout << "Is weekend: " << (isWeekend ? "Yes" : "No");
  }
  else
  {
    std::cerr << "Something went wrong" << std::endl;
  }

  return 0;
}
/*
This code example produces the following output:
Is weekend: Yes
*/

See Also