Click here to Skip to main content
14,092,036 members
Click here to Skip to main content
Add your own
alternative version


27 bookmarked
Posted 11 Oct 2004

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


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. <o:p>

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. <o:p>

So this solution will be application for following business requirements. <o:p>

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


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


About the Author

Sandip Dalvi Tung
Web Developer
United States United States
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.

You may also be interested in...

Comments and Discussions

GeneralMy vote of 4 Pin
Chloe Lim23-Feb-11 19:11
memberChloe Lim23-Feb-11 19:11 
GeneralAuto Increment Alphanumeric Pin
vaozvazer23-Sep-10 12:30
membervaozvazer23-Sep-10 12:30 
GeneralSaved my hours Pin
Member 743864720-Sep-10 22:01
memberMember 743864720-Sep-10 22:01 
GeneralSaved me hours on my project Pin
Greg Olmstead7-Jul-10 10:56
memberGreg Olmstead7-Jul-10 10:56 
GeneralThis can be cut simplify. Pin
lilimalin6-Jan-09 14:01
memberlilimalin6-Jan-09 14:01 
Generalmeaning of the isAllZed and is AllNine in the program. Pin
tchshiping21-Sep-08 19:59
membertchshiping21-Sep-08 19:59 
GeneralNot always using letters or numbers Pin
Mr. Candyman20-Feb-08 5:45
memberMr. Candyman20-Feb-08 5:45 
QuestionAuto generate number a unique primary key Pin
ramakant_135211-Apr-07 2:45
memberramakant_135211-Apr-07 2:45 
GeneralExcellent Pin
hongeu24-Mar-07 0:02
memberhongeu24-Mar-07 0:02 
QuestionHuh? Pin
Paul Conrad30-Jun-06 20:35
professionalPaul Conrad30-Jun-06 20:35 
GeneralNext value Pin
woo_hoo22-Apr-06 3:05
memberwoo_hoo22-Apr-06 3:05 
GeneralRe: Next value Pin
je_gonzalez10-Feb-09 14:58
memberje_gonzalez10-Feb-09 14:58 

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

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

Permalink | Advertise | Privacy | Cookies | Terms of Use | Mobile
Web04 | 2.8.190518.1 | Last Updated 12 Jun 2006
Article Copyright 2004 by Sandip Dalvi Tung
Everything else Copyright © CodeProject, 1999-2019
Layout: fixed | fluid