System::Boolean class

Boolean class

क्लास जो System.Boolean .Net प्रकार के स्थैतिक सदस्यों को रखती है।

class Boolean

विधियाँ

विधिविवरण
static Parse(const String&)निर्दिष्ट स्ट्रिंग को बूल प्रकार के मान में परिवर्तित करता है।
static TryParse(const String&, bool&)निर्दिष्ट स्ट्रिंग को बूल प्रकार के मान में परिवर्तित करता है।

फ़ील्ड्स

फ़ील्डविवरण
static FalseStringString ‘false’ बूलियन मान का प्रतिनिधित्व।
static TrueStringString ’true’ बूलियन मान का प्रतिनिधित्व।

टिप्पणियाँ

#include <system/boolean.h>

using namespace System;

int main()
{
  // बूलियन वेरिएबल बनाएं।
  bool isWeekend = false;

  // इनपुट स्ट्रिंग को पार्स करें और परिणाम प्रिंट करें।
  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
*/

संबंधित देखें