VB.Net Tutorial/Operator/is Like

Материал из VB Эксперт
Перейти к: навигация, поиск

String is Like "regular expressions *"

public class Test
   public Shared Sub Main
               Dim s As String
               s = "VB.Net"
               If s Like "*VB.Net" Then Console.WriteLine(""VB.Net" is Like "*VB.Net"")
   End Sub
End class
"VB.Net" is Like "?B.Net"

String is Like "regular expressions ?" (question mark)

public class Test
   public Shared Sub Main
               Dim s As String
               s = "VB.Net"
               If s Like "?B.Net" Then Console.WriteLine(""VB.Net" is Like "?B.Net"")
   End Sub
End class
"VB.Net" is Like "?B.Net"