Login Register


[RELEASE] Random String Generator filter_list
Author
Message
RE: [RELEASE] Random String Generator #4
Looks nice man. Thanks for sharing.

Here is my code in VB.NET for generating random strings (not exactly the same but still handy for people who are interested in this thing).

Spoiler:
Code:
Module StringGenerator Sub Main() '## Variables and arrays Dim intStringsToGenerate As Double Dim rndRandom As New Random Dim arrLetters() As String = {"a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z"} '## Ask for input Console.WriteLine("How many strings do you want to generate?") Console.Write("Number of strings:") '## Parse the console input to integer intStringsToGenerate = Integer.Parse(Console.ReadLine()) '## Write the strings to console For i = 0 To intStringsToGenerate - 1 Dim strCurrent As String = String.Empty Dim intLength As Integer = Integer.Parse(rndRandom.Next(3, 15)) '## Add the random letters to the string For z = 0 To intLength strCurrent = strCurrent & arrLetters(rndRandom.Next(0, 26)).ToString Next '## Write the generated string to the console Console.WriteLine(strCurrent) Next End Sub End Module
~~ Might be back? ~~

Reply





Messages In This Thread
RE: [RELEASE] Random String Generator - by Bish0pQ - 09-16-2016, 11:00 PM



Users browsing this thread: