Home > Net >  Put a algorithm, bar code within the scope of the value added to an array of strings
Put a algorithm, bar code within the scope of the value added to an array of strings

Time:09-25

Paragraph a number must be the same as before and after PB001 - PB003 three values PB001 PB002 PB003 on list


Similar A01 them roughly range 100-200 - A10,

CodePudding user response:

Continue to pray for a train of thought to also go them roughly have a prefix letter to may or may not have

CodePudding user response:

Not directly Split (" - ")

CodePudding user response:

The Split two values, and timber is to all the value range

CodePudding user response:

Traverse the range value of splicing character collection in the list is ok, it doesn't take algorithm, a simple string operations,

CodePudding user response:

The Split will return an array, why only two values,

CodePudding user response:

You must first press - split range, string [] a="PB001 - PB003". The split (' - ');
Then defined as string min=a minimum string Max [0]=[1] a biggest

Then you have to sit to judge for the first character of min, if I can save to Numbers is string MinNumber +=split (min)......
Then your MinNumber would be a similar to "002" the character,
Then you just converted to type int is this scope, it is ok to split again Max and you have the minimum range of int the biggest,

Finally you write a for loop for (int I=(int) min; i
  •  Tags:  
  • C#
  • Related