AddToEnd

public static void AddToEnd( this System.Windows.Forms.ListBox lb, object o )
{
    lb.Items.Add( o );
    lb.TopIndex = lb.Items.Count - 1;
    lb.ClearSelected();
}
Example:
ListBox1.AddToEnd( "foo" );
ListBox1.AddToEnd( "bar" );

Description

Adds an item to a listbox as the last item, and makes sure it is visible.

Details

Double click on the code to select all.

 

;