System::Boolean class
Contents
[
Hide
]Boolean class
Class that keeps static members of System.Boolean .Net type.
class Boolean
Methods
Method | Description |
---|---|
static Parse(const String&) | Converts the specified string to a value of bool type. |
static 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.PDF for C++