Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

use linq to get an observable collection into an array

Posted on 2009-07-15
2
Medium Priority
?
2,772 Views
Last Modified: 2013-11-11
Is it possible to use linq to get an observable collection into an array?

I have an observable collection of integer, and I want to move all of them into an array of integers.
0
Comment
Question by:dchau12
  • 2
2 Comments
 
LVL 64

Accepted Solution

by:
Fernando Soto earned 2000 total points
ID: 24866295
Hi dchau12;

Using Linq to convert an observable collection of integers to an array of integers can be done as follows.

// Assuming that the variable oc is the ObservableCollection
int[] intArray = oc.ToArray();

Fernando
0
 
LVL 64

Expert Comment

by:Fernando Soto
ID: 24875835
Hi dchau12;

Have you tried it yet?

Fernando
0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
This video shows how to quickly and easily deploy an email signature for all users in Office 365 and prevent it from being added to replies and forwards. (the resulting signature is applied on the server level in Exchange Online) The email signat…
Integration Management Part 2
Suggested Courses

926 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question