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.
所以说如果我有这个代码
circularProgress1.IsRunning = Not circularProgress1.IsRunning // in VB
我将如何在 C# 中做到这一点?
circularProgress1.IsRunning != circularProgress1.IsRunning // This doesn't work
circularProgress1.IsRunning = !circularProgress1.IsRunning;
=是一个赋值并且!是一个否定
=
!
!=算子是算子的对立面==。true当两个对象不相等时返回。旁注:在 VB.NET 中,赋值运算符和相等运算符都是 =.
!=
==
true
circularProgress1.IsRunning = !circularProgress1.IsRunning.