public static T GetElement <T>()
        {
            Array values = Enum.GetValues(typeof(T));
            T     value  = (T)values.GetValue(NumberData.GetNumber(values.Length));

            return(value);
        }
        public static string GetSubString(int length, string characters)
        {
            StringBuilder returnString = new StringBuilder();
            int           charLength   = characters.Length;

            while (length > 0)
            {
                returnString.Append(characters[NumberData.GetNumber(charLength)]);
                length--;
            }
            return(returnString.ToString());
        }
 public static string GetIpAddress()
 {
     object[] number = new object[] { NumberData.GetNumber(256), ".", NumberData.GetNumber(256), ".", NumberData.GetNumber(256), ".", NumberData.GetNumber(256) };
     return(string.Concat(number));
 }
예제 #4
0
        public static T GetElement <T>(ICollection <T> collection)
        {
            int index = NumberData.GetNumber(0, collection.Count);

            return(collection.ElementAt <T>(index));
        }
예제 #5
0
 public static int GetStreetNumber()
 {
     return(NumberData.GetNumber(900));
 }