Click here to Skip to main content
15,900,461 members
Home / Discussions / C#
   

C#

 
GeneralRe: Pairing common ones Pin
Hum Dum5-Aug-08 21:47
Hum Dum5-Aug-08 21:47 
GeneralRe: Pairing common ones Pin
Alan Balkany6-Aug-08 3:48
Alan Balkany6-Aug-08 3:48 
AnswerRe: Pairing common ones Pin
User 66585-Aug-08 22:47
User 66585-Aug-08 22:47 
AnswerRe: Pairing common ones Pin
PIEBALDconsult6-Aug-08 4:52
mvePIEBALDconsult6-Aug-08 4:52 
Questionexcel problem Pin
Mogaambo5-Aug-08 21:09
Mogaambo5-Aug-08 21:09 
AnswerRe: excel problem Pin
Bardy855-Aug-08 21:17
Bardy855-Aug-08 21:17 
QuestionGet results based on two Lists Pin
Programm3r5-Aug-08 21:02
Programm3r5-Aug-08 21:02 
AnswerRe: Get results based on two Lists Pin
Harvey Saayman5-Aug-08 23:08
Harvey Saayman5-Aug-08 23:08 
This was driving me NUTS! cuz i knew what to do, just not exactly how Smile | :)

found the answer after an hour or so of trail and error... the following seems to work

static void Main(string[] args)
{
    List<string> match = new List<string> { "a", "b", "apple", "c", "grape" };
    List<string> fruits = new List<string> { "apple", "passionfruit", "banana", "mango", "orange", "blueberry", "grape", "strawberry" };

    var query1 = from matchList in match
                 select matchList;


    var query2 = from myFruits in fruits
                join matchList in query1 on myFruits equals matchList
                select myFruits;

    foreach (var item in query2)
    {
        Console.WriteLine(item);
    }
    Console.Read();
}</string></string></string></string>


Hope this is what you wanted

Harvey Saayman - South Africa
Junior Developer
.Net, C#, SQL

you.suck = (you.passion != Programming)

GeneralRe: Get results based on two Lists Pin
Programm3r5-Aug-08 23:25
Programm3r5-Aug-08 23:25 
GeneralRe: Get results based on two Lists Pin
Harvey Saayman5-Aug-08 23:36
Harvey Saayman5-Aug-08 23:36 
AnswerRe: Get results based on two Lists Pin
PIEBALDconsult6-Aug-08 4:42
mvePIEBALDconsult6-Aug-08 4:42 
QuestionRegex for splitting strings Pin
AmitDey5-Aug-08 20:28
AmitDey5-Aug-08 20:28 
AnswerRe: Regex for splitting strings Pin
blackjack21505-Aug-08 20:56
blackjack21505-Aug-08 20:56 
AnswerRe: Regex for splitting strings Pin
Guffa6-Aug-08 0:16
Guffa6-Aug-08 0:16 
AnswerRe: Regex for splitting strings Pin
PIEBALDconsult6-Aug-08 4:18
mvePIEBALDconsult6-Aug-08 4:18 
QuestionCell KeyPress event of DataGridView Pin
M Riaz Bashir5-Aug-08 20:05
M Riaz Bashir5-Aug-08 20:05 
AnswerRe: Cell KeyPress event of DataGridView Pin
Bardy855-Aug-08 21:15
Bardy855-Aug-08 21:15 
AnswerRe: Cell KeyPress event of DataGridView Pin
devildx205022-Sep-11 2:32
devildx205022-Sep-11 2:32 
QuestionHow can I use a C program in C# Pin
strizi5-Aug-08 19:54
strizi5-Aug-08 19:54 
AnswerRe: How can I use a C program in C# Pin
rah_sin5-Aug-08 20:19
professionalrah_sin5-Aug-08 20:19 
GeneralRe: How can I use a C program in C# Pin
strizi5-Aug-08 20:26
strizi5-Aug-08 20:26 
GeneralRe: How can I use a C program in C# Pin
MarkB7775-Aug-08 20:52
MarkB7775-Aug-08 20:52 
GeneralRe: How can I use a C program in C# Pin
strizi5-Aug-08 21:00
strizi5-Aug-08 21:00 
GeneralRe: How can I use a C program in C# Pin
MarkB7775-Aug-08 21:20
MarkB7775-Aug-08 21:20 
GeneralRe: How can I use a C program in C# Pin
strizi5-Aug-08 21:32
strizi5-Aug-08 21:32 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.