vb.net - Getting the character that inside the brackets -
this string:
dim value string = "ir_10748(1).jpg"
how can number 1 variable? thinking use split. how can use value in vb.net?
try this:
dim value string = "ir_10748(1).jpg" dim splitstrings() string 'split on either opening or closing parenthesis - 'this give 3 strings - "ir_10748","1",".jpg" splitstrings = value.split(new string() {"(",")"}, stringsplitoptions.none) 'parse integer if required dim integer = integer.parse(splitstrings(1))
Comments
Post a Comment