System::Boolean class
محتويات
[
يخفي
]Boolean class
فئة تحتفظ بالأعضاء الثابتة لنوع System.Boolean .Net.
class Boolean
الطرق
| طريقة | الوصف |
|---|---|
| static Parse(const String&) | يحوّل السلسلة المحددة إلى قيمة من نوع bool. |
| static TryParse(const String&, bool&) | يحوّل السلسلة المحددة إلى قيمة من نوع bool. |
الحقول
| حقل | الوصف |
|---|---|
| static FalseString | String تمثيل القيمة المنطقية ‘false’. |
| static TrueString | String تمثيل القيمة المنطقية ’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
*/
انظر أيضًا
- Namespace System
- Library Aspose.Page for C++