Equality comparison between multiple variables

Viewed 77180

I've a situation where I need to check whether multiple variables are having same data such as

var x=1;
var y=1;
var z=1;

I want to check whether x==1 and y==1 z==1 (it may be '1' or some other value). instead of this, is there any short way I can achieve same such as below

if(x==y==z==1)

Is this possible in C#?

14 Answers
Related