4 Replies - 367 Views - Last Post: 25 September 2013 - 03:27 AM Rate Topic: -----

#1 Pistol Pete  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 24-September 13

Windows form application question

Posted 24 September 2013 - 02:12 AM

How would I go about creating code making the program generate a random vowel? Any assistance would be appreciated.
Is This A Good Question/Topic? 0
  • +

Replies To: Windows form application question

#2 Pistol Pete  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 24-September 13

Re: Windows form application question

Posted 24 September 2013 - 02:17 AM

^ Specific vowels (with a picture) but in random order.
Was This Post Helpful? 0
  • +
  • -

#3 MrShoes  Icon User is offline

  • D.I.C Regular
  • member icon

Reputation: 312
  • View blog
  • Posts: 488
  • Joined: 13-June 12

Re: Windows form application question

Posted 24 September 2013 - 02:43 AM

Have a collection (list, array, whatever) of char types, each with the vowels you want (remembering that upper case is a different character). Use the Random class to generate a random number between 0 and the upper bound of your collection. Get the char at that point in the collection.
Was This Post Helpful? 1
  • +
  • -

#4 synlight  Icon User is offline

  • D.I.C Addict
  • member icon

Reputation: 88
  • View blog
  • Posts: 580
  • Joined: 14-September 11

Re: Windows form application question

Posted 24 September 2013 - 05:23 AM

MSDN is always very helpful for me. Here is the Random class..

System.Random Class
Was This Post Helpful? 1
  • +
  • -

#5 RexGrammer  Icon User is offline

  • Coding Dynamo
  • member icon

Reputation: 181
  • View blog
  • Posts: 777
  • Joined: 27-October 11

Re: Windows form application question

Posted 25 September 2013 - 03:27 AM

Just remember that the upper bound of the array/list is not the same as the amount of objects in that array/list, because every collection starts with the index 0.

I didn't quite understand your second post? How do you mean with a picture? Could you explain it a bit better, or give a input/output example?
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1