What does this mean?

  • Thread starter Thread starter Chris
  • Start date Start date
C

Chris

I've been working with c# for some time now and I've just seen a syntax
I don't recognise in a system I am looking at.

What does this do?

bool MyVariable &= Method();



By the way, Method() reurns a bool
 
Hi Chris

A &= B is the same as A = A & B. However, your sample won't compile as you need to declare MyVariable before you use it.

bool MyVariable = Something;
MyVariable &= Method();
 
Back
Top