Why my code Array value always contain "0" ?
static void Main(string[] args)
{
string Input = Console.ReadLine();
char[] Number = new char[3];
Util.SetNumber(Input,Number);
foreach (char digit in Number)
{
Console.WriteLine(digit);
}
Console.ReadKey();
}
This is the Class :
class Util
{
public static void SetNumber(string Input,char[] Number)
{
Number = Input.ToCharArray();
}
}
But if the "foreach" part i put it in Util.cs, it write the values..
Thank you before,