[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

Randomize Order Of Numbers

Posted on 2011-03-16
4
Medium Priority
?
356 Views
Last Modified: 2012-05-11
Hi.

I have a number string that i need to randomize every time.

"0123456789" i need it to randomize the order; ie, "0987234561"

can someone please help me with a solution in c#?

thanks.
0
Comment
Question by:freezingHot
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 53

Accepted Solution

by:
Dhaest earned 2000 total points
ID: 35148009
C# Randomize Chars in String
http://www.dotnetperls.com/randomize-string
0
 
LVL 1

Author Closing Comment

by:freezingHot
ID: 35148028
short and sweet... thanks for the quick response.
0
 
LVL 14

Expert Comment

by:athomsfere
ID: 35148103
Will it always be numbers 0-9?

Is there a reason you want to use that string?

I would think using a random number 0-9 would suffice, and you could use a while (NumberSting < LenthWanted) and append random numbers to the string.
0
 
LVL 1

Author Comment

by:freezingHot
ID: 35148286
yes, i need to randomize the order of the numbers 0-9 each time a form is presented.

the linq solution above is quick and easy.... thanks.
0

Featured Post

Tech or Treat!

Submit an article about your scariest tech experience—and the solution—and you’ll be automatically entered to win one of 4 fantastic tech gadgets.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This article series is supposed to shed some light on the use of IDisposable and objects that inherit from it. In essence, a more apt title for this article would be: using (IDisposable) {}. I’m just not sure how many people would ge…
Introduction Hi all and welcome to my first article on Experts Exchange. A while ago, someone asked me if i could do some tutorials on object oriented programming. I decided to do them on C#. Now you may ask me, why's that? Well, one of the re…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …

650 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question