Click here to Skip to main content
Licence 
First Posted 11 Oct 2004
Views 45,811
Bookmarked 24 times

Alphanumeric increment in C#

By | 11 Jun 2006 | Article
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

About the Author

Sandip Dalvi Tung

Web Developer

United States United States

Member

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.


Sign Up to vote   Poor Excellent
Add a reason or comment to your vote: x
Votes of 3 or less require a comment

Comments and Discussions

 
You must Sign In to use this message board. (secure sign-in)
 
Search this forum  
 FAQ
    Noise  Layout  Per page   
  Refresh
GeneralMy vote of 4 PinmemberChloe Lim19:11 23 Feb '11  
GeneralAuto Increment Alphanumeric Pinmembervaozvazer12:30 23 Sep '10  
GeneralSaved my hours PinmemberMember 743864722:01 20 Sep '10  
GeneralSaved me hours on my project PinmemberGreg Olmstead10:56 7 Jul '10  
GeneralThis can be cut simplify. Pinmemberlilimalin14:01 6 Jan '09  
Generalmeaning of the isAllZed and is AllNine in the program. Pinmembertchshiping19:59 21 Sep '08  
GeneralNot always using letters or numbers PinmemberMr. Candyman5:45 20 Feb '08  
QuestionAuto generate number a unique primary key Pinmemberramakant_13522:45 11 Apr '07  
GeneralExcellent Pinmemberhongeu0:02 24 Mar '07  
QuestionHuh? PinmemberPaul Conrad20:35 30 Jun '06  
GeneralNext value Pinmemberwoo_hoo3:05 22 Apr '06  
GeneralRe: Next value Pinmemberje_gonzalez14:58 10 Feb '09  

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.

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