Deveel.History.GetHistory C# (CSharp) Method

GetHistory() public static method

Get a particular history item. Zero is the most recent.
public static GetHistory ( int index ) : String
index int
return String
        public static String GetHistory(int index)
        {
            if (index >= 0 && index < history.Count)
                return (string)(history[history.Count - index - 1]);
            return String.Empty;
        }

Usage Example

Example #1
0
 // Move down one line in the history.
 private static void MoveDown()
 {
     if (historyPosn == 0)
     {
         historyPosn = -1;
         SetCurrent(historySave);
     }
     else if (historyPosn > 0)
     {
         --historyPosn;
         SetCurrent(History.GetHistory(historyPosn));
     }
     else
     {
         Console.Beep();
     }
 }
All Usage Examples Of Deveel.History::GetHistory