StartWith例子

    Private Sub StartWith_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles StartWith.Click
        Dim nickName As String = "Coperator"
        Dim charLower As String = "c"
        Dim charUpper As String = "C"
        MsgBox("c match test")
        If nickName.StartsWith(charLower) Then
            MsgBox("Coperator mach c success")
        Else
            MsgBox("Coperator mach c fail")
        End If
        MsgBox("C match test")
        If nickName.StartsWith(charUpper) Then
            MsgBox("Coperator mach C success")
        Else
            MsgBox("Coperator mach C fail")
        End If
    End Sub

你可能感兴趣的:(StartWith例子)