Use ushort as the parameter for overload methods
using System;
class Util
{
public static void Process(short value)
{
Console.WriteLine("short {0}", value);
}
public static void Process(ushort value)
{
Console.WriteLine("ushort {0}", value);
}
}
class MainClass
{
public static void Main()
{
byte value = 3;
Util.Process(value);
}
}
Output short 3
|
HTML code for linking to this page:
Related in same category :
-
-
|