? 4 Full :
Sub Main()
Dim fileTypesZ As String() = {"PDF", "TXT", "DOC", "DOCX", "XLS", "XLSX", "JPG", "JPGE", "BMP", "GIF"}
If (fileTypesZ.Contains("PDF")) Then
MsgBox("Yay")
End If
End Sub
, array.contains , "PDF", "PD" - . indexof, .
: Dim fileTypesZ As String() = { "PDF", "TXT", "DOC", "DOCX", "XLS", "XLSX", "JPG", "JPGE", "BMP", "GIF" }
If (fileTypesZ.Contains("PD")) Then
MsgBox("Yay")
Else
For i = 0 To fileTypesZ.Length - 1
If fileTypesZ(i).IndexOf("PD") = 0 Then
MsgBox("Yay")
End If
Next
End If