src/Abc123/AlphaNumericService.cs
/// <summary>
/// Gets the Value at the specified index
/// </summary>
/// <param name="index">Zero based index</param>
/// <returns></returns>
Gets the Value at the specified index
Gets the Value at the specified index
public string GetString(int index)
        {
            if (index > _characters.Length - 1)
            {
                var mod = index % _count;
                var prefixIndex = Math.Floor(Convert.ToDouble(index / _count)) - 1;
                var prefix = GetString(Convert.ToInt32(prefixIndex));
                return string.Concat(prefix, GetString(mod));
            }
            return _characters.GetValue(index).ToString();
        }
public string GetString ( int index ) { if ( index > _characters . Length - 1 ) { var mod = index % _count ; var prefixIndex = Math . Floor ( Convert . ToDouble ( index / _count ) ) - 1 ; var prefix = GetString ( Convert . ToInt32 ( prefixIndex ) ) ; return string . Concat ( prefix , GetString ( mod ) ) ; } return _characters . GetValue ( index ) . ToString ( ) ; }
Gets the Value at the specified index
Gets the Value at the specified index
None
index
int
Zero based index
Zero based index