I want my id like SR18/1 and then SR18/2....like this.what will be my code for increment..
What I have tried:
I cant be able to generate SR18/2
I agree with the above: Making something that is alphanumeric poses a lot of questions. The code below is a basic solution to this
As a simple code explanation you use this
Dim parentString As String = "SR18/"
Dim previousInt As Int16 = 35
Dim currentPart As String = ""
currentPart = fnMakeNext(parentString, previousInt)
previousInt = previousInt + 1
Dim loadsofParts As New List(Of String)
Dim endofLot As Int16 = 72
loadsofParts = fnMakeManyParts(previousInt, endofLot, parentString)
For Each s As String In loadsofParts
Private Function fnMakeManyParts(previousInt As Short, endofLot As Short, parentString As String) As List(Of String)
Dim result As New List(Of String)
For p As Int16 = previousInt To endofLot Step 1
Private Function fnMakeNext(parentString As String, previousInt As Short) As String
Dim returned As String
returned = parentString + previousInt.ToString
The code only addresses that you want to make an incremental alphanumeric text. It does not address anything about the need of why your are coding this.