Explicitly convert to an unsigned value in c#

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

class JkExample {

static void Main(string[] args) {

int i = -100;

uint ui = (uint)i;

Console.WriteLine("Original Value: {0}", i);
Console.WriteLine("Explicitly Converted Value: {0}", ui);

Console.ReadLine();
}
}

Comments or Responses

Login to post response