Imports System.Numerics
Module Example
Public Sub Main()
Dim number As BigInteger = 10
Dim exponent As Integer = 3
Dim modulus As BigInteger = 30
Console.WriteLine("({0}^{1}) Mod {2} = {3}",number, exponent, modulus,BigInteger.ModPow(number, exponent, modulus))
End Sub
End Module