Click here to Skip to main content
Click here to Skip to main content

Alphanumeric increment in C#

, 11 Jun 2006
Rate this:
Please Sign up or sign in to vote.
This code is very useful when you want to auto increment number using A-Z and 1-9 with possible combinationYou can pass any string and system will return next possible number e.g. You can Pass number "PRO01A9" then You will get "PRO01B1"

 Download source files - 439 Kb

Introduction

This code is useful when you want to generate number which can be auto-Alphanumeric increment  like product code or Item code this will generate next possible number using A-Z and 0-9 number.

one good thing with this is you can always keep width of Number fix all the time system will always return number in same with as u passed one.

So this solution will be application for following business requirements.

  • When You want to generate Item code or product code with fix width
  • Auto Increment based on last number so you don't have to manage any system this code will return same.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here

Share

About the Author

Sandip Dalvi Tung
Web Developer
United States United States
Hi,
I proud to be a member of farmer family who use to grow like sugar cane, Capsicum. etc. And you know it very difficult to reach in IT industry who belongs to farmer. Any way I am working in wel know IT company in Pune, as Lead position, having almost 7+ yrs. of IT experience. Mainly in C#,Winforms and .NET related technology.
I hope my knowledge will help you guys to minimize your efforts
Thanks for giving me opportunity to minimize your some sleepless night.

Comments and Discussions

 
GeneralMy vote of 4 PinmemberChloe Lim23-Feb-11 19:11 
GeneralAuto Increment Alphanumeric Pinmembervaozvazer23-Sep-10 12:30 
GeneralSaved my hours PinmemberMember 743864720-Sep-10 22:01 
GeneralSaved me hours on my project PinmemberGreg Olmstead7-Jul-10 10:56 
GeneralThis can be cut simplify. Pinmemberlilimalin6-Jan-09 14:01 
Generalmeaning of the isAllZed and is AllNine in the program. Pinmembertchshiping21-Sep-08 19:59 
GeneralNot always using letters or numbers PinmemberMr. Candyman20-Feb-08 5:45 
QuestionAuto generate number a unique primary key Pinmemberramakant_135211-Apr-07 2:45 
GeneralExcellent Pinmemberhongeu24-Mar-07 0:02 
QuestionHuh? PinmemberPaul Conrad30-Jun-06 20:35 
GeneralNext value Pinmemberwoo_hoo22-Apr-06 3:05 
GeneralRe: Next value Pinmemberje_gonzalez10-Feb-09 14:58 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Mobile
Web04 | 2.8.140827.1 | Last Updated 12 Jun 2006
Article Copyright 2004 by Sandip Dalvi Tung
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid