C# Multiple Variable - Print Single and Multiple Variable in C#
C# Multiple Variable

- Use a comma-separated list, to declare more than one variable of the same type.
Sample Code
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Multiple_Variables
{
class Program
{
static void Main(string[] args)
{
int x, y, z;
x = y = z = 50;
Console.WriteLine(x + y + z);
Console.ReadLine();
}
}
}
Output
150