1

I have problem with cloning a list which is not a generic one.

In WPF, I have a property MyListView.SelectedItems which is an IList, non-generic list.

I want to clone it but I have no such extensions like for generic list.

How to achieve this?

1 Answer 1

2

You could do this

var collection = new ArrayList(yourIList);
Sign up to request clarification or add additional context in comments.

1 Comment

@SnakeEyes please note - this only copies the reference of the items, not make new copies of them.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.