Javascript BigInt.Js what should be eqivalent for some of this code
<p><a href="http://www.leemon.com/crypto/BigInt.js" rel="nofollow">http://www.leemon.com/crypto/BigInt.js</a></p>

<p>I am using the leemon bigint.js library</p>

<p>I am to write some c# equivalent class for <a href="http://smart2.qred.fi/js/jknc.js" rel="nofollow">http://smart2.qred.fi/js/jknc.js</a></p>

<p>I am confuse on it what c# i should write for this line</p>

<pre><code>  var bigInteger = new BigInt(convert);
</code></pre>

<p>so that i can make my c# class proper.</p>

<p>I am to write c# class for this <a href="http://www.jknc.eu/RFcalculator" rel="nofollow">http://www.jknc.eu/RFcalculator</a> and this is that JS file that require to write in c# <a href="http://smart2.qred.fi/js/jknc.js" rel="nofollow">http://smart2.qred.fi/js/jknc.js</a>, i write the class but unable to get the write result what i check though the creator site.</p>

<p>I write this function</p>

<pre><code> public string jknc_calculate_creditor_reference(string text)
    {
        //var bigInteger=new BigInt( convert_text_to_digits(text+'RF00') );     
        BigInteger biginteger = new BigInteger(Convert.ToInt16(convert_text_to_digits(text + "RF00")));
        //$('integer_calculate').innerhtml=biginteger.tostring();
        //var mod = bigint_mod(biginteger, new bigint(97));
        //var y = bigint_number(mod);

        //BigInteger big = new BigInteger(1222222);
        BigInteger mod;
        BigInteger.DivRem(biginteger, new BigInteger(97), out mod);


        var x = 98 - mod;
        var result = "";

        //$('x').innerhtml=x;
        //$('y').innerhtml=y;

        if (x &lt; 10)
        {
            result = "0" + x;
        }
        else
        {
            result = Convert.ToString(x);
        }
        //$('result').innerhtml=result;
        var newstr = text.Replace(" ", ""); //remove white space
        string complete_result = "rf " + result + " " + format_string(newstr);
        return complete_result;
        //$('complete_result').innerhtml='rf '+result+ " "+format_string(newstr);
    }
</code></pre>

<p>for the JS file</p>

<pre><code>function jknc_calculate_creditor_reference(text) {
    var bigInteger = new BigInt(convert_text_to_digits(text + 'RF00'));
    //$('integer_calculate').innerHTML=bigInteger.toString();
    var mod = bigint_mod(bigInteger, new BigInt(97));
    var y = bigint_number(mod);

    var x = 98 - y;
    var result = "";

    //$('x').innerHTML=x;
    //$('y').innerHTML=y;

    if (x &lt; 10) {
        result = '0' + x;
    } else {
        result = x;
    }
    $('result').innerHTML = result;
    var newStr = text.replace(/\s/g, '');

    $('complete_result').innerHTML = 'RF ' + result + " " + format_string(newStr);
}
</code></pre>

<p>and that has a reference of this script</p>

<pre><code>http://www.onicos.com/staff/iz/amuse/javascript/expert/BigInt.txt
</code></pre>

<p>but my fucntion do not give right results because i am unable to fix on BigInt js library.</p>
