0

So I previously found this post How to check multiple conditions in rdlc expression which had this code inside:

Public Function GetGender(ByVal val as String) As String 
  Dim retVal as String = ""   
  If(val = "1") 
  retVal = "Male"
  Else If (val = "2")
  retVal = "???"
  Else If (val = "3")
  retVal = "???"
  Else
  retVal = "???"
  End If
 Return retVal
End Function

This code works, but instead of (val="1") I need something like (val = "th*") that it searches and replaces anything that contains th, for example

Zohar Peled
  • 79,642
  • 10
  • 69
  • 121

1 Answers1

0

Looks like VB. Try val.StartsWith("th") – Caius Jard

This was the answer, thank you a lot Caius.!! I am new to stackoverflow so I'm still learning how to use this site.