public class Test
public Shared Sub Main
Dim intCounter As Integer
Dim strString As String = "some silly string"
For intCounter = 0 To strString.Length - 1
If strString(intCounter) = "s" Then
strString = strString.Remove(intCounter, 1)
strString = strString.Insert(intCounter, "S")
End If
Next intCounter
Console.WriteLine(strString)
End Sub
End class
|