|
tech
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Generate ordered list of alphanumeric strings in .NET (C#)I have a programming question to generate an ordered list of
alphanumeric strings of length 4. >From 0000 to ZZZZ, numbers first, then one alphabet rest numbers, then two alphabets rest numberst, etc.EG 0000-9999 then A000-Z999 then AA00 to ZZ99 then AAA0 - ZZZ9 then AAAA - ZZZZ Class assignment, right? So you wouldn't think of solving this rather simple
problem yourself? Tom Dacon Dacon Software Consulting <dohyohdoh***@gmail.com> wrote in message Show quoteHide quote news:1166830864.501044.92150@f1g2000cwa.googlegroups.com... >I have a programming question to generate an ordered list of > alphanumeric strings of length 4. >>From 0000 to ZZZZ, numbers first, then one alphabet rest numbers, then > two alphabets rest numberst, etc. > > EG 0000-9999 then A000-Z999 then AA00 to ZZ99 then AAA0 - ZZZ9 then > AAAA - ZZZZ > nope not hw, its for work.
Show quoteHide quote On Dec 22, 6:50 pm, "Tom Dacon" <T***@dacons.com> wrote: > Class assignment, right? So you wouldn't think of solving this rather simple > problem yourself? > > Tom Dacon > Dacon Software Consulting > > <dohyohdoh***@gmail.com> wrote in messagenews:1166830864.501044.92***@f1g2000cwa.googlegroups.com... > > >I have a programming question to generate an ordered list of > > alphanumeric strings of length 4. > >>From 0000 to ZZZZ, numbers first, then one alphabet rest numbers, then > > two alphabets rest numberst, etc. > > > EG 0000-9999 then A000-Z999 then AA00 to ZZ99 then AAA0 - ZZZ9 then > > AAAA - ZZZZ Yeah ... right.
This exact question comes up every year about this time give or take a few days. A holiday season homework assignment. <dohyohdoh***@gmail.com> wrote in message Show quoteHide quote news:1166850048.231059.44600@73g2000cwn.googlegroups.com... > nope not hw, its for work. > > On Dec 22, 6:50 pm, "Tom Dacon" <T***@dacons.com> wrote: >> Class assignment, right? So you wouldn't think of solving this rather >> simple >> problem yourself? >> >> Tom Dacon >> Dacon Software Consulting >> >> <dohyohdoh***@gmail.com> wrote in >> messagenews:1166830864.501044.92***@f1g2000cwa.googlegroups.com... >> >> >I have a programming question to generate an ordered list of >> > alphanumeric strings of length 4. >> >>From 0000 to ZZZZ, numbers first, then one alphabet rest numbers, then >> > two alphabets rest numberst, etc. >> >> > EG 0000-9999 then A000-Z999 then AA00 to ZZ99 then AAA0 - ZZZ9 then >> > AAAA - ZZZZ > I'm going to suggest you create an instance of the
FourPositionAlphanumericStringCollection class and simply call the Generate() method on it. That's what I'd do. <dohyohdoh***@gmail.com> wrote in message Show quoteHide quote news:1166850048.231059.44600@73g2000cwn.googlegroups.com... > nope not hw, its for work. > > On Dec 22, 6:50 pm, "Tom Dacon" <T***@dacons.com> wrote: >> Class assignment, right? So you wouldn't think of solving this rather >> simple >> problem yourself? >> >> Tom Dacon >> Dacon Software Consulting >> >> <dohyohdoh***@gmail.com> wrote in >> messagenews:1166830864.501044.92***@f1g2000cwa.googlegroups.com... >> >> >I have a programming question to generate an ordered list of >> > alphanumeric strings of length 4. >> >>From 0000 to ZZZZ, numbers first, then one alphabet rest numbers, then >> > two alphabets rest numberst, etc. >> >> > EG 0000-9999 then A000-Z999 then AA00 to ZZ99 then AAA0 - ZZZ9 then >> > AAAA - ZZZZ > Way to go Tom!!!!!!!!!!!!!!!!
Show quoteHide quote "Tom Leylan" <tleylan@nospam.net> wrote in message news:eCqRBNlJHHA.4992@TK2MSFTNGP04.phx.gbl... > I'm going to suggest you create an instance of the > FourPositionAlphanumericStringCollection class and simply call the > Generate() method on it. That's what I'd do. > > > <dohyohdoh***@gmail.com> wrote in message > news:1166850048.231059.44600@73g2000cwn.googlegroups.com... >> nope not hw, its for work. >> >> On Dec 22, 6:50 pm, "Tom Dacon" <T***@dacons.com> wrote: >>> Class assignment, right? So you wouldn't think of solving this rather >>> simple >>> problem yourself? >>> >>> Tom Dacon >>> Dacon Software Consulting >>> >>> <dohyohdoh***@gmail.com> wrote in >>> messagenews:1166830864.501044.92***@f1g2000cwa.googlegroups.com... >>> >>> >I have a programming question to generate an ordered list of >>> > alphanumeric strings of length 4. >>> >>From 0000 to ZZZZ, numbers first, then one alphabet rest numbers, then >>> > two alphabets rest numberst, etc. >>> >>> > EG 0000-9999 then A000-Z999 then AA00 to ZZ99 then AAA0 - ZZZ9 then >>> > AAAA - ZZZZ >> > > Wow, you have a much more robust version of the .Net
framework than I do. That class must be in .Net 2.5. ;-) Robin S. ------------------- Show quoteHide quote "Tom Leylan" <tleylan@nospam.net> wrote in message news:eCqRBNlJHHA.4992@TK2MSFTNGP04.phx.gbl... > I'm going to suggest you create an instance of the > FourPositionAlphanumericStringCollection class and simply call the > Generate() method on it. That's what I'd do. > > > <dohyohdoh***@gmail.com> wrote in message > news:1166850048.231059.44600@73g2000cwn.googlegroups.com... >> nope not hw, its for work. >> >> On Dec 22, 6:50 pm, "Tom Dacon" <T***@dacons.com> wrote: >>> Class assignment, right? So you wouldn't think of solving this >>> rather simple >>> problem yourself? >>> >>> Tom Dacon >>> Dacon Software Consulting >>> >>> <dohyohdoh***@gmail.com> wrote in >>> messagenews:1166830864.501044.92***@f1g2000cwa.googlegroups.com... >>> >>> >I have a programming question to generate an ordered list of >>> > alphanumeric strings of length 4. >>> >>From 0000 to ZZZZ, numbers first, then one alphabet rest numbers, >>> >>then >>> > two alphabets rest numberst, etc. >>> >>> > EG 0000-9999 then A000-Z999 then AA00 to ZZ99 then AAA0 - ZZZ9 >>> > then >>> > AAAA - ZZZZ >> > > Thanks for all your help people, I was able to figure it out. The
problem was I was trying to do it with the help of the FagsAndDykesCollection class but once I stopped doing that, it was a breeze. ;) RobinS wrote: Show quoteHide quote > Wow, you have a much more robust version of the .Net > framework than I do. That class must be in .Net 2.5. ;-) > > Robin S. > ------------------- > "Tom Leylan" <tleylan@nospam.net> wrote in message > news:eCqRBNlJHHA.4992@TK2MSFTNGP04.phx.gbl... > > I'm going to suggest you create an instance of the > > FourPositionAlphanumericStringCollection class and simply call the > > Generate() method on it. That's what I'd do. > > > > > > <dohyohdoh***@gmail.com> wrote in message > > news:1166850048.231059.44600@73g2000cwn.googlegroups.com... > >> nope not hw, its for work. > >> > >> On Dec 22, 6:50 pm, "Tom Dacon" <T***@dacons.com> wrote: > >>> Class assignment, right? So you wouldn't think of solving this > >>> rather simple > >>> problem yourself? > >>> > >>> Tom Dacon > >>> Dacon Software Consulting > >>> > >>> <dohyohdoh***@gmail.com> wrote in > >>> messagenews:1166830864.501044.92***@f1g2000cwa.googlegroups.com... > >>> > >>> >I have a programming question to generate an ordered list of > >>> > alphanumeric strings of length 4. > >>> >>From 0000 to ZZZZ, numbers first, then one alphabet rest numbers, > >>> >>then > >>> > two alphabets rest numberst, etc. > >>> > >>> > EG 0000-9999 then A000-Z999 then AA00 to ZZ99 then AAA0 - ZZZ9 > >>> > then > >>> > AAAA - ZZZZ > >> > > > >
your favorite VB 2005 book?
Caspol -s off in .NET 2.0 error beginner: weakest sides of .NET? .NET libraries you use 3rd Party UI controls for .Net 2.0 ... any comments/suggestion? Error importing key - object already exists. VS 2005 Service Pack 1 - details PDF conversion Visual Studio 2005 - Diagram Text From Another (Application) Window... |
|||||||||||||||||||||||