Cannot implicity convert int to bool
<p>Okay, so I'm getting a "cannot convert int to bool" error.</p>

<p>I'm trying to convert this VB .net code:</p>

<pre class="lang-vb prettyprint-override"><code>Function GetChecksum(ByVal Source As String) As Long
    Dim iVal, Weight, CheckHold, CheckSum As Long
    Weight = 1
    CheckSum = 0
    For iVal = 1 To Len(Source)
        CheckHold = Asc(Mid$(Source, iVal, 1)) * Weight
        CheckSum = CheckSum + CheckHold
        Weight = Weight + 2
    Next iVal
    GetChecksum = CheckSum Mod &amp;H7FFFFFFF
End Function
</code></pre>

<p>I've gotten up to here:</p>

<pre><code>    public long getCheckSum(string source)
    {
        long iVal, weight, checkgold, checksum = new long();
        weight = 1;
        checksum = 0;
        for (iVal = 1; Strings.Len(source);)
        {

        }
    }
</code></pre>

<p>The problem is the "For (iVal = 1; Strings.Len(source);)" code. I am using "Microsoft.VisualBasic". I just don't know what to do right now. If you could help me that'd be great.</p>
