Click here to Skip to main content
15,885,767 members
Home / Discussions / C#
   

C#

 
AnswerRe: can't catch task exception with C# Pin
Nathan Minier10-Apr-19 2:13
professionalNathan Minier10-Apr-19 2:13 
AnswerRe: can't catch task exception with C# Pin
Richard Deeming15-Apr-19 8:11
mveRichard Deeming15-Apr-19 8:11 
QuestionCompare Two Complex List of data Pin
V Krishna9-Apr-19 16:07
V Krishna9-Apr-19 16:07 
AnswerRe: Compare Two Complex List of data Pin
Gerry Schmitz10-Apr-19 6:55
mveGerry Schmitz10-Apr-19 6:55 
QuestionRe: Compare Two Complex List of data Pin
Maciej Los10-Apr-19 10:27
mveMaciej Los10-Apr-19 10:27 
QuestionHow to update my list1 property value by list2 property value by joining Pin
Mou_kol9-Apr-19 9:42
Mou_kol9-Apr-19 9:42 
AnswerRe: How to update my list1 property value by list2 property value by joining Pin
Eddy Vluggen10-Apr-19 0:21
professionalEddy Vluggen10-Apr-19 0:21 
QuestionHow to equi join and left join between 3 List<t> Pin
Mou_kol9-Apr-19 9:41
Mou_kol9-Apr-19 9:41 
suppose i have List1, List2 & List3

now i want to perform left join between List1 & List2 and equi join between List1 & List3 at same place. how to achieve it....if possible please include a sample code.

this kind of join i am looking for
C#
var list1 = new []{
    new { CountryID = 12, CountryData = "Has good gras", regionUID = 4567  },
    new { CountryID = 12, CountryData = "nice weather", regionUID = 6789  },
    new { CountryID = 16, CountryData = "stormy weather", regionUID = 1234 }};

var list2 = new []{
    new { CountryID = 12, CountryName = "green hill"},
    new { CountryID = 16, CountryName = "stormy mountain"}
};

var list3 = new []{
    new {regionUID = 4567, regionName = "above 1000feet"},
    new {regionUID = 6789, regionName = "on the ground"},
    new {regionUID = 1234, regionName = "on the hill"}
};

var result = from m1 in list1
    join m2 in list2 on m1.CountryID equals m2.CountryID
    select new { m2.CountryName, m1.CountryData, m1.regionUID } into intermediate
    join m3 in list3 on intermediate.regionUID equals m3.regionUID
    select new { intermediate.CountryName, intermediate.CountryData, m3.regionName};



but the above code does not suit for my scenario. so please share a sample code where left join between List1 & List2 and equi join between List1 & List3 at same place.

thanks
QuestionApplication Server and Connection Method Pin
mikiz8-Apr-19 21:30
mikiz8-Apr-19 21:30 
AnswerRe: Application Server and Connection Method Pin
Pete O'Hanlon9-Apr-19 1:22
mvePete O'Hanlon9-Apr-19 1:22 
AnswerRe: Application Server and Connection Method Pin
Eddy Vluggen9-Apr-19 1:53
professionalEddy Vluggen9-Apr-19 1:53 
GeneralRe: Application Server and Connection Method Pin
mikiz9-Apr-19 4:13
mikiz9-Apr-19 4:13 
GeneralRe: Application Server and Connection Method Pin
Dave Kreskowiak9-Apr-19 4:36
mveDave Kreskowiak9-Apr-19 4:36 
GeneralRe: Application Server and Connection Method Pin
Eddy Vluggen9-Apr-19 5:48
professionalEddy Vluggen9-Apr-19 5:48 
AnswerRe: Application Server and Connection Method Pin
Dave Kreskowiak9-Apr-19 3:05
mveDave Kreskowiak9-Apr-19 3:05 
GeneralRe: Application Server and Connection Method Pin
mikiz9-Apr-19 4:02
mikiz9-Apr-19 4:02 
GeneralRe: Application Server and Connection Method Pin
Eddy Vluggen9-Apr-19 8:56
professionalEddy Vluggen9-Apr-19 8:56 
GeneralRe: Application Server and Connection Method Pin
Dave Kreskowiak9-Apr-19 9:22
mveDave Kreskowiak9-Apr-19 9:22 
GeneralRe: Application Server and Connection Method Pin
Eddy Vluggen9-Apr-19 9:28
professionalEddy Vluggen9-Apr-19 9:28 
AnswerRe: Application Server and Connection Method Pin
Gerry Schmitz9-Apr-19 5:58
mveGerry Schmitz9-Apr-19 5:58 
AnswerRe: Application Server and Connection Method Pin
Mycroft Holmes9-Apr-19 12:29
professionalMycroft Holmes9-Apr-19 12:29 
QuestionIPV6 Compatibility Pin
chain singh aanjana7-Apr-19 20:37
chain singh aanjana7-Apr-19 20:37 
AnswerRe: IPV6 Compatibility Pin
Gerry Schmitz8-Apr-19 5:47
mveGerry Schmitz8-Apr-19 5:47 
QuestionHow to add second column to a listBox component? Pin
Member 140558797-Apr-19 9:13
Member 140558797-Apr-19 9:13 
AnswerRe: How to add second column to a listBox component? Pin
Mycroft Holmes7-Apr-19 12:27
professionalMycroft Holmes7-Apr-19 12:27 

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.