+ 2

Is there a way to initialize multiple variables in c#?

Like this: int a, b, c, d = 1;?

14th Dec 2017, 12:18 PM
🇹🇿 Petr Vitásek
🇹🇿 Petr Vitásek - avatar
1 Answer
+ 4
You can do : int a = 1, b = 1, c = 1; or int a, b, c; a = b = c = 1;
14th Dec 2017, 11:33 PM
Bryan Martinet
Bryan Martinet - avatar