C ++ Windows Form和WPF中的矩形属性比较 [英] Rectangle Properties comparison in c++ Windows Form and WPF

查看:96
本文介绍了C ++ Windows Form和WPF中的矩形属性比较的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好
在Windows窗体中,"if语句"中使用矩形变量名,并且它返回如下布尔值:

if (someRectangle)
if (!someRectangle)



或这样的矩形为空:

someRectangle = nullptr;



请您描述以下内容:
-我们在这些if语句中评估矩形的哪个属性,是否存在,启用,初始化,非空或...?
-将矩形设置为等于nullptr时会发生什么?是禁用还是...?
-WPF(c#)中这些"if语句"和"rectangle = nullptr"的等效含义是什么?或不与一个对象.在对象存在的情况下,它对任何属性都没有影响.在您问过的所有三种情况下都是如此.


Hello Everyone
In Windows forms a rectangle variable name is used in a "if Statement" and it returns a Boolean values as such:

if (someRectangle)
if (!someRectangle)



or a rectangle is nulled as such:

someRectangle = nullptr;



Would you please describe the following:
-What property of the rectangle we are evaluating in these if statements, is it if exist, enabled, initialized, nonempty or ...?
-What happens when a rectangle is set equal to nullptr? is it disabled or ...?
-What is the equivalent of these "if statements" and "rectangle=nullptr" in WPF (c#)?

解决方案

This test merely checks whether the rectangle refers to an object or not. It has no effect on any of the properties in the case that the object exists. This holds true in all the three situations you have asked about.


这篇关于C ++ Windows Form和WPF中的矩形属性比较的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆