fixed problem of decimal part
Public Function changeToWords(ByVal numb As [String]) As [String]
Dim val As [String] = ""
Dim wholeNo As [String] = numb
Dim points As [String] = ""
Dim andStr As [String] = ""
Dim pointStr As [String] = ""
Dim endStr As [String] = "Only"
Dim decimalPlace As Integer = numb.IndexOf(".")
If decimalPlace > 0 Then
wholeNo = numb.Substring(0, decimalPlace)
points = numb.Substring(decimalPlace + 1)
If Convert.ToInt32(points) > 0 Then
andStr = "and"
If (Len(points) > 1) Then
pointStr = translateWholeNumber(points).Trim()
Else
pointStr = translateCents(points)
End If
pointStr = pointStr & " Paise "
End If
End If
val = [String].Format("{0} {1} {2} {3}", translateWholeNumber(wholeNo).Trim(), "Rupees " & andStr, pointStr, endStr)
Return val
End Function