System::Boolean sınıfı

Boolean class

Statik üyeleri System.Boolean .Net tipinde tutan sınıf.

class Boolean

Yöntemler

YöntemAçıklama
static Parse(const String&)Belirtilen dizeyi bool tipinde bir değere dönüştürür.
static TryParse(const String&, bool&)Belirtilen dizeyi bool tipinde bir değere dönüştürür.

Alanlar

AlanAçıklama
static FalseString‘false’ boolean değerinin String temsili.
static TrueString’true’ boolean değerinin String temsili.

Açıklamalar

#include <system/boolean.h>

using namespace System;

int main()
{
  // Boolean değişkeni oluştur.
  bool isWeekend = false;

  // Girdi dizesini ayrıştır ve sonucu yazdır.
  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
*/

Ayrıca Bakınız