0

need help in removing the first characters in a number then adding 1 to the number then returning the 2 first characters that were removed. example i want to remove CR FROM CR499 THEN i add 1 to 499 then add back the CR.
any help will be appreciated

3
Contributors
3
Replies
4
Views
10 Years
Discussion Span
Last Post by Hamrick
0
Dim source As String = "CR499"
Dim code As String = source.Substring( 0, 2 )
Dim value As Integer = Convert.ToInt32( source.Substring( 2 ) ) + 1

source has the original string, code has "CR", and value is an integer with the value of 500. Is that what you're trying to do?

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.