Boolean
Contents
[
Hide
]Boolean class
Class that keeps static members of System.Boolean .Net type.
class Boolean
Methods
Method | Description |
---|---|
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
Field | Description |
---|---|
static FalseString | String representation of ‘false’ boolean value. |
static TrueString | String 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
- Namespace System
- Library Aspose.Slides