Created
August 6, 2015 18:11
-
-
Save money4honey/ceda15ded0d4110ebc10 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
namespace myClasses | |
{ | |
public class Spintax | |
{ | |
public static string getVariant(string text, char delimiter) { | |
Random random = new Random(); | |
string[] array = text.Split(delimiter); | |
return array[random.Next(array.Length - 1)]; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment