Need help - Clone function causes exception

Need help - Clone function causes exception

Post by John Yun » Sun, 27 Jan 2002 06:57:19



Hello,

I am trying to get a copy of a ListViewItem object (this object already has
sub-items and other properties setup), so I use the clone function:

ListViewItem oLVItem = (ListViewItem)_lvwItem.Clone(); // I want to make a
copy of the lvwItem object

but I got an exception:

Exception source: System.Windows.Forms
Exception message: Value null was found where an instance of an object was
required.

Could someone please give me a hint, THANK!

John Yung