January 12, 2010 - 1:47 pm
Tags: EqualityComparer, Generics, LINQ
Posted in Development | Comments Off
In the last post on Loving Linq we covered the .Except method for comparing two lists. The example was very simple and demonstrated how to compare to String lists. In this post we’ll cover an advanced scenario where we need to compare lists of a class we created.
We’ll start with an implementation of IEqualityComparer<T> EqualityComparer<T> which [...]
November 10, 2009 - 2:30 pm
Tags: .NET, LINQ, NIEM, WCF
Posted in Development, NIEM | 1 comment
Over the years while working with .NET and NIEM I’ve run into a few kinks that require a setting tweak or an extra step to get it to work.
.NET General
Choices for working with NIEM Xml (From the .NET Base class library. There are third-party tools out there to assist as well):
Serialization / Deserialization – [...]
October 4, 2009 - 8:37 pm
Tags: CodePlex, LINQ, NIEM, Xml
Posted in Development | Comments Off
Following up on the “IEPD Development in the .NET Environment” that I co-presented with Carl Nelson, I have posted the source code to the LINQ to NIEM example on CodePlex at http://linq2niem.codeplex.com/.
Look through the source and shoot me any questions you might have!
There is more NIEM and .NET goodness to come. Stay tuned!
December 18, 2008 - 11:06 pm
Tags: LINQ, NIEM, Xml
Posted in LINQ, NIEM | Comments Off
There are many ways to build XML documents but the main approach I have used in the past was to build an object model and leverage serialization. This approach was effective but costly in terms of serialization time and complexity of building the objects. I have previously blogged about using LINQ to XML to transform [...]
January 4, 2010 - 8:55 am
Oops. Not EXACTLY equal, just containing the same things although not in the same order.
csharp> string[] a = new string[] { “A”, “B”, “C” };
csharp> string[] b = new string[] { “B”, “A”, “C” };
csharp> var c = a.Except(b);
csharp> c
> ;
{ }
January 4, 2010 - 9:04 am
Yep. In my testing as long as they had the same data in there order didn’t matter. I was using it to compare one file that had a few dozen things to another that had like 12,000. If any of the few dozen (file a) were not in the 12,000 (file b) I wanted to know.
Working pretty good so far!