Solved

How to create a time series as a SortedDictionary(Of Date, Object) from a generic collection in VB.NET?

Posted on 2012-04-12
1
333 Views
Last Modified: 2012-04-12
I have a collection of objects in a Dictionary(Of Integer, SomeObject) where the integer is an Id. The stored objects have a date property, and I want to create an extension to the Dictionary(Of Integer, SomeObject) that return a time series using the date property.
I was thinking to implement the time series using a SortedDictionary(Of Date, SomeObject).

What is the best practice way to do that conversion to a time series? Obviously I'm looking for a smart .NET way to do it and not a from-scratch algorithm.
0
Comment
Question by:andreas_rafn
1 Comment
 

Accepted Solution

by:
andreas_rafn earned 0 total points
Comment Utility
Not very well thought through, adding dates as kesy that is, since there might be several objects having same date.

Anyways I learned how to use comparers ad made a customized comparer for the purpose.
0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

728 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

9 Experts available now in Live!

Get 1:1 Help Now