Write a program in C# to generate a Cartesian Product of two sets in LINQ Query
belongs to collection: All LINQ programs in C# with examples
All Answers
total answers (1)
belongs to collection: All LINQ programs in C# with examples
total answers (1)
I have used Visual Studio 2012 for debugging purpose. But you can use any version of visul studio as per your availability.
Result:
The Cartesian Product are :
{ letterlist = A, numberlist = 1 }
{ letterlist = A, numberlist = 2 }
{ letterlist = A, numberlist = 3 }
{ letterlist = B, numberlist = 1 }
{ letterlist = B, numberlist = 2 }
{ letterlist = B, numberlist = 3 }
{ letterlist = C, numberlist = 1 }
{ letterlist = C, numberlist = 2 }
{ letterlist = C, numberlist = 3 }
need an explanation for this answer? contact us directly to get an explanation for this answer