The exception:
System.ArgumentOutOfRangeException: InvalidArgument=Value of '-1379311' is not valid for 'length'.
Parameter name: length
at System.Windows.Forms.ComboBox.Select(Int32 start, Int32 length)
at System.Windows.Forms.ComboBox.set_SelectionStart(Int32 value)
The code:
ComboBox cb;
cb.SelectionStart = cb.Text.Length;
The fix:
cb.Select(cb.Text.Length, 0)
Subscribe to:
Post Comments (Atom)
1 comment:
I have this error too.. But I can't understand what is causing it!!!
(BTW: the number changes often)
Post a Comment