-4

我有一个bool可能是truefalse显示不同的消息,具体取决于bool使用?and的值:

我在下面试过

Message = if(isPGUID = true) "ParentGuide" else "Guid is not the parent Guid",
4

1 回答 1

4

你可能的意思是:

Message = isPGUID ? "ParentGuide" : "Guid is not the parent Guid";

尽管您的问题可能需要一些澄清。

于 2013-08-14T15:19:22.703 回答