Hello & Thanks ;
win 10 .vb
Help: string.contains prob , & Console.WriteLine() not working ?
Pls , why is "Console.WriteLine() not working" ?
Also , How could I make test with 'case insensitive' ?
Thanks for your Help...
win 10 .vb
Help: string.contains prob , & Console.WriteLine() not working ?
Pls , why is "Console.WriteLine() not working" ?
Also , How could I make test with 'case insensitive' ?
Thanks for your Help...
VB.NET:
Private Sub TestThis_Click(sender As Object, e As EventArgs) Handles TestThis.Click
Test("Dot Net Perls")
Test("dot net perls")
End Sub
Sub Test(ByVal input As String)
' Write the formal parameter.
Console.Write("--- ")
Console.Write(input)
Console.WriteLine(" ---")
' See if it contains this string.
Dim net As Boolean = input.Contains("Net")
WriteLine("Contains 'Net': ")
Console.WriteLine(net)
Console.Read()
' MsgBox("Contains 'Net': ")
' See if it contains this string.
If input.Contains("perls") Then
Console.WriteLine("Contains 'perls'")
Console.Read()
' MsgBox("Contains 'perls'")
End If
' See if it does not contain this string.
If Not input.Contains("Dot") Then
Console.WriteLine("Doesn't Contain 'Dot'")
Console.Read()
' MsgBox("Doesn't Contain 'Dot'")
End If
End Sub