-3

aight so I'm making a WPF application and it has a loading window and on that loading window i want the text to be random every time the app is started any idea on how to do this?

1 Answers1

0

Depending on what you mean by "Random" there could be multiple ways to do this:

  1. Have a Hardcoded list of Loading texts in Application (or a resource like xml or database). Read a random line from this store.

  2. Do a WebApi call to fetch the loading text (You need to create/find relevant WebApi).

  3. Want Truly Random/runtine generated text? Ok - generate a random number in range: −2,147,483,648 to 2,147,483,647. Convert this to UTF-32. Keep appending more chars and/or spaces until a minimum string length is achieved. Use this as the Loading text.

If you are looking for generating a random Integer - Look at this

Prateek Shrivastava
  • 1,877
  • 1
  • 10
  • 17