Below solution divides the problem into sub problems of size y/2 and call the sub problems recursively

public static UInt64 Power(UInt64 x, UInt64 n)
{
    if (n == 0)
        return 1;
    else if (n % 2 == 0)
        return Power(x, n / 2) * Power(x, n / 2);
    else
        return x * Power(x, n / 2) * Power(x, n / 2);

}

Test Case

UInt64 x = 0;
UInt64 n = 0;
x = 2; n = 2;
Console.WriteLine(string.Format("{0}^{1} ={2}", x, n, Power(x, n)));
x = 2; n = 3;
Console.WriteLine(string.Format("{0}^{1} ={2}", x, n, Power(x, n)));
x = 10; n = 2;
Console.WriteLine(string.Format("{0}^{1} ={2}", x, n, Power(x, n)));
x = 12; n = 18;
Console.WriteLine(string.Format("{0}^{1} ={2}", x, n, Power(x, n)));
Console.Read();

Output

2^2 =4
2^3 =8
10^2 =100
12^18 =8176589207175692288