' Collection of code snippets by Arne Vajhøj 
' (likely posted to comp.os.vms/INFO-VAX, INFO-TPU, MACRO32, eksperten.dk, newz.dk, LinkedIn or other place sometime between 1990 and now) 
Imports System

Class MainClass

    Public Shared Function DiffChar(ByVal s1 As String, ByVal s2 As String) As Integer
        Dim tmp1() As Char = s1.ToUpper.ToCharArray
        Dim tmp2() As Char = s2.ToUpper.ToCharArray
        Dim res As Integer = 0
        Dim i As Integer
        For i = 0 To Math.Min(tmp1.Length, tmp2.Length) - 1
            If tmp1(i) <> tmp2(i) Then
                res = res + 1
            End If
        Next
        res = res + Math.Max(tmp1.Length, tmp2.Length) - Math.Min(tmp1.Length, tmp2.Length)
        Return res
    End Function

    Public Shared Sub Main(ByVal args As String())
        Console.WriteLine(DiffChar("abcde", "axcye"))
        Console.WriteLine(DiffChar("abcde", "axcy"))
        Console.WriteLine(DiffChar("abcd", "axcye"))
    End Sub
End Class 
