Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个bool可能是true或false显示不同的消息,具体取决于bool使用?and的值:
bool
true
false
?
:
我在下面试过
Message = if(isPGUID = true) "ParentGuide" else "Guid is not the parent Guid",
你可能的意思是:
Message = isPGUID ? "ParentGuide" : "Guid is not the parent Guid";
尽管您的问题可能需要一些澄清。