title: C# Up Down Arrow for Next/Previous in a string list/collection
body: <p>I am a bit confused here:</p>
  
  <p><strong>Windows Forms Application, in C#.</strong>  </p>
  
  <p>Let's say I have a text box.  And when the user enters text into that text box, and submits that to the server, it populates what the user wrote into an internal <code>List&lt;string&gt;</code>.</p>
  
  <p>Now, let's say that when a user presses like <code>ctrl + UP</code> on the keyboard, that I want it to return the LAST message they typed (which is essentially the last message added to the <code>List&lt;string&gt;</code> collection.</p>
  
  <p>And if the user presses <code>ctrl + Down</code> on the keyboard, it should return the previous message that occurred before the last <code>up</code> was pressed.</p>
  
  <p>But, oddly, i'm utterly confused as to how to implement this.  LOL i know it's like uber simple, but strangely, i can't seem to figure it out.</p>
  
  <pre><code>inputPublicHistory[inputPublicHistory.Count - 1]
  </code></pre>
  
  <p>Seems like a logical method to pull the previous history, like when i press 'up'.  But, obviously, w/o a method to track where that index is, it's hard to compare.</p>
  
  <pre><code>inputPublicHistoryIndex +=1
  </code></pre>
  
  <p>I could add that after a the user presses the <code>Ctrl + Up</code> on the keyboard, to increment the index, and just return that result, but is that really a valid/proper way to do this?</p>
  
  <p>Maybe i'm just overthinking this, perhaps one of you awesome people here could help me get my h ead screwed on straight with such a simple task.</p>