Problem with KeyLogger in C#
<p>I want to log my keyboard strokes. However, when I add a new keyboard to keyList, it changes all items to the new one. For example, if keyList contains A and B, and I type C, then my keyList would C, C ,C instead of A,B,C. </p>

<p>do you know what causing this problem? Shouldn't I use List ? </p>

<pre><code>KeyboardEvent myKeyBoardEvent = new KeyboardEvent();
List&lt;KeyboardEvent&gt; keyList = new List&lt;KeyboardEvent&gt;();
List&lt;WorkflowEvent&gt; myLogs = new List&lt;WorkflowEvent&gt;();

public void LogKeyboadEvent(Key keyboard)
{
myKeyBoardEvent.Key = keyboard.ToString();
keyList.Add(myKeyBoardEvent);
myLogs.Add(myKeyBoardEvent);
}
</code></pre>
