Closed anwarminarso closed 6 months ago
Maybe you could post an issue here
Try adding a namespace using using System.Numerics;
, works for me
using System.Numerics;
var value = new BigInteger(32000);
var exponent = new BigInteger(64000);
var modulus = new BigInteger(96123);
var result = BigInteger.ModPow(value, exponent, modulus);
Console.WriteLine($"Result: {result}");
Sorry, I forgot to add using System.Numerics;
to the question code example above.
The problem is that after compiling the file extensions .exe and .dll should be formed. Strangely, when compiled with .NET 8, the .dll extension file was not formed.
The strangest thing is that when I created a new project with the same source code (copy paste), when I compiled it with .NET 8 it worked normally.
I'm using VS 2022 version 17.8.2, Windows 11
btw, thank you for your response.
BigInteger does not work correctly in .NET 8
When running this code with .NET 6 and .NET 7 it works fine. Why doesn't this code work when compiled with .NET 8? I've also added the System.Runtime.Numerics package reference but it still doesn't run.
This is my example code: