Solved

update generic list with values from another generic list using multiple column join

Posted on 2013-11-15
5
378 Views
Last Modified: 2013-11-29
I have two genric lists, I need to update the vlaues in one generic list with values fom another

List1
ID
DATE
Return


List2
ID
DATE
Value

There could be no values for List1 in list2 but I need to get default or empty values
0
Comment
Question by:countrymeister
  • 3
  • 2
5 Comments
 
LVL 15

Expert Comment

by:unknown_routine
ID: 39652159
How did you define these lists? are these both list of Strings?
0
 
LVL 1

Author Comment

by:countrymeister
ID: 39652215
ID int
Date datetime
Value decimal


ID int
Date DateTime
Return decimal
0
 
LVL 15

Accepted Solution

by:
unknown_routine earned 500 total points
ID: 39659681
You can not put different types inside a "generic list".

By Generic, do you refer to a Generic list? For example:


 Dim lstItems As List(Of String) = New List(Of String)


You can however create a class with ID, Date, Value as its properties and add it to a generic list.

Please clarify your question.
0
 
LVL 1

Author Comment

by:countrymeister
ID: 39660489
Maybe I did not put my question more clearly.
I need to update values in one list based on the values in the other

The ID is the join field and so is the Date, I want to update the Value field with that of the return
0
 
LVL 1

Author Closing Comment

by:countrymeister
ID: 39686089
Could not understand my question and did not povide a good solution
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
JSON  parse help 7 40
Finding the IIS version 5 22
c# DateTime Format validation 4 47
Updating a single record in forEach using C#/Entity 7 8
We all know that functional code is the leg that any good program stands on when it comes right down to it, however, if your program lacks a good user interface your product may not have the appeal needed to keep your customers happy. This issue can…
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…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

821 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