Hello Forum, how are you?

Okay so, I wish to create a bunch of strings. Simple....

string myName = "Usmaan";
string myOccupation = "Engineer";
string myFav = "DaniWeb";
string randomString = "";

Now what I want to do is, make the compiler randomly....I repeat, randomly select one of those strings, copy it's value/content and paste it in to another string variable.

So if for example, myName got "randomly" selected then the randomString should now contain "Usmaan".

How would I implement this?


Any help will be highly appreciated.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.