• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 355
  • Last Modified:

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

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
andreas_rafn
Asked:
andreas_rafn
1 Solution
 
andreas_rafnAuthor Commented:
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

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now