A
Auto
I am unable to compile the code below - using C# ORCAS (9.0.20404.0 Beta 1 -
JUNE 2007), because i get the following error:
'System.Numeric.BigInteger' is inaccessible due to its protection level
C:\Documents and Settings\Massimo\Local Settings\Application Data\Temporary
Projects\TestBigInteger\Program.cs 12 40 TestBigInteger
-----------------------------------------------------------------------------------
using System;
using System.Numeric;
namespace TryOutBigInteger {
class MyBigIntApp {
static BigInteger BigFactorial(BigInteger x) {
if (x < 0)
return BigFactorial(-x);
else if (x <= 1)
return x;
else return x * BigFactorial(--x);
}
static void Main(string[] args) {
BigInteger x = BigInteger.Parse(Console.ReadLine());
Console.WriteLine(BigFactorial(x).ToString());
Console.ReadLine();
}
}
}
-----------------------------------------------------------------------------------
http://blogs.msdn.com/bclteam/archi...ng-system-numeric-biginteger-inbar-gazit.aspx
Any help ?
Thanks.
JUNE 2007), because i get the following error:
'System.Numeric.BigInteger' is inaccessible due to its protection level
C:\Documents and Settings\Massimo\Local Settings\Application Data\Temporary
Projects\TestBigInteger\Program.cs 12 40 TestBigInteger
-----------------------------------------------------------------------------------
using System;
using System.Numeric;
namespace TryOutBigInteger {
class MyBigIntApp {
static BigInteger BigFactorial(BigInteger x) {
if (x < 0)
return BigFactorial(-x);
else if (x <= 1)
return x;
else return x * BigFactorial(--x);
}
static void Main(string[] args) {
BigInteger x = BigInteger.Parse(Console.ReadLine());
Console.WriteLine(BigFactorial(x).ToString());
Console.ReadLine();
}
}
}
-----------------------------------------------------------------------------------
http://blogs.msdn.com/bclteam/archi...ng-system-numeric-biginteger-inbar-gazit.aspx
Any help ?
Thanks.