-3

I want to compare _code with the first 3 letters of AUS-BIS-000129(AUS), IF both are same then will continue with the if condition. How can I do that?

The value of _Code will be 3 Letters for example(AUS,AUA,AUB). So if (AUS="AUS-BIS-000129") then I have to do some query.AUS-BIS-000129 is a string

 If (_code = AUS-BIS-000129)
     {
     }
Wernfried Domscheit
  • 54,457
  • 9
  • 76
  • 110
shim sur
  • 3
  • 3
  • 1
    If ``AUS-BIS-000129`` is a string, please read about comparing string, matching beginnings/ends/substrings etc. Otherwise, please specify what exactly it is. – dumetrulo Feb 01 '18 at 09:06

1 Answers1

1

One way of doing it:

if("AUS-BIS-000129".StartsWith(_code))
{
  //...
}
Carra
  • 17,808
  • 7
  • 62
  • 75