Solved

use linq to get an observable collection into an array

Posted on 2009-07-15
2
2,576 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 62

Accepted Solution

by:
Fernando Soto earned 500 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 62

Expert Comment

by:Fernando Soto
ID: 24875835
Hi dchau12;

Have you tried it yet?

Fernando
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK (http://www.microsoft.com/en-us/download/details.aspx?id=27876) for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

760 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

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now