To assign one value into multiple variable in c#

Jitendrasoft09
Posted by Jitendrasoft09 under C# category on | Points: 40 | Views : 934
using System;

class JkExample {

static void Main(string[] args) {

int x = 20;
int y;
y = x;

y = x = 40;
Console.WriteLine("X: {0}", x);
Console.WriteLine("Y: {0}", y);

Console.ReadLine();
}
}

Comments or Responses

Login to post response