Old tip in java: a^=true is faster than a=!a. http://tomcopeland.blogs.com/juniord... I think this kind of performance improvemetn should be left to the compiler. By the way, I just tried, and in C# both operations take exactly the same amount of time.