.net 3.5 - Comparing 2 CSV files in C# advice? -
I need to develop an application where two CSV files are compared. A list of email addresses in the first file The second list contains email addresses, but names and address information are included. The first list contains email addresses that should be removed from the second list. I have a Fast CSV reader from the CodeProject site that works very well, the application will not have access to a database server. A new file will be prepared with the data that is verified. Meaning, it will not contain any information from the first file.
If you read both lists, you use Linq to define the subset of the address can do.
Here is a quick example class which I have alerted for you.
using the system; Using System.Linq; Using System.Collections.Generic; Remove public class example {public list & lt; Items & gt; RemoveAddresses (list & amp; lt; item & gt; source list, list & lt; string & gt; remove email address add-on) {list & lt; Items & gt; NewList = (In the sourceList, select from! E-mail address, ConnectorMov. Dialog (sAM)) .Olist (); Return new; } Public class items {public string email {get; Set; } Public string name {get; Set; } Public string address {get; Set; }}}
To use it, read your CSV in a list, then pass it, and remove your list of addresses to remove it as a list of methods.
Comments
Post a Comment