Is there a way that let me make a copy of a reference itself? For example, I’ve a ListView control added on the form and I want to persist its Items Collection i.e.
ListViewItemCollection lvic = ListView.Items();
and when i call ListView.Items.Clear(), lvic should not be cleared.
Cloning / copying is a wide subject. It really depends on the scenario. In you case, you can simply make a copy of the collection using Linq
Be carefull with cloning in this scenario. an instance of ListViewItemCollection can’t be assigned to a ListView and a copy of ListView or ListViewItem still uses some native resources (in the winforms and wpf world) so copying will lead to terrible bugs when used wrongly