Click here to Skip to main content
15,886,778 members
Home / Discussions / C#
   

C#

 
GeneralRe: Clear comments and rename var/method names at compile time Pin
OriginalGriff18-Jan-20 4:52
mveOriginalGriff18-Jan-20 4:52 
GeneralRe: Clear comments and rename var/method names at compile time Pin
Lupu5R3x18-Jan-20 6:57
Lupu5R3x18-Jan-20 6:57 
GeneralRe: Clear comments and rename var/method names at compile time Pin
OriginalGriff18-Jan-20 7:01
mveOriginalGriff18-Jan-20 7:01 
AnswerRe: Clear comments and rename var/method names at compile time Pin
Gerry Schmitz18-Jan-20 7:00
mveGerry Schmitz18-Jan-20 7:00 
GeneralRe: Clear comments and rename var/method names at compile time Pin
Lupu5R3x18-Jan-20 7:09
Lupu5R3x18-Jan-20 7:09 
GeneralRe: Clear comments and rename var/method names at compile time Pin
Dave Kreskowiak18-Jan-20 16:03
mveDave Kreskowiak18-Jan-20 16:03 
GeneralRe: Clear comments and rename var/method names at compile time Pin
Gerry Schmitz18-Jan-20 17:30
mveGerry Schmitz18-Jan-20 17:30 
Questioncompare two dictionary and display difference Pin
mjbaquiran18-Jan-20 0:01
mjbaquiran18-Jan-20 0:01 
hi, I have my

dictionary1
key values
1 {item 1, 10; item 2, 20; item 3, 40}
2 {item 1, 15; item 2, 28; item 3, 40}
3 {item 1, 15; item 2, 28; item 3, 40}


dictionary2
key values
1 {item 1, 12; item 2, 20; item 3, 40}
2 {item 1, 15; item 2, 25; item 3, 40}
3 {item 1, 15; item 2, 28; item 3, 40}

i need to compare the 2 dictionary and result should be; item 3 dont need to display since there is no changes.

dictionary3
key values
1 {item 1, 12}
2 {item 2, 25}

this is what i used.

var dictionary3 = dictionary2.Where(entry => dictionary1[entry.Key] != entry.Value)
.ToDictionary(entry => entry.Key, entry => entry.Value);

and return
1 {item 1, 12; item 2, 20; item 3, 40}
2 {item 1, 15; item 2, 25; item 3, 40}

thank you

modified 18-Jan-20 13:05pm.

QuestionRe: compare two dictionay and display difference Pin
Eddy Vluggen18-Jan-20 0:30
professionalEddy Vluggen18-Jan-20 0:30 
AnswerRe: compare two dictionay and display difference Pin
mjbaquiran18-Jan-20 7:05
mjbaquiran18-Jan-20 7:05 
AnswerRe: compare two dictionay and display difference Pin
Gerry Schmitz18-Jan-20 6:40
mveGerry Schmitz18-Jan-20 6:40 
GeneralRe: compare two dictionay and display difference Pin
mjbaquiran18-Jan-20 7:08
mjbaquiran18-Jan-20 7:08 
GeneralRe: compare two dictionay and display difference Pin
Gerry Schmitz18-Jan-20 7:52
mveGerry Schmitz18-Jan-20 7:52 
AnswerRe: compare two dictionary and display difference Pin
BillWoodruff19-Jan-20 0:19
professionalBillWoodruff19-Jan-20 0:19 
AnswerRe: compare two dictionary and display difference Pin
Richard Deeming20-Jan-20 7:52
mveRichard Deeming20-Jan-20 7:52 
GeneralRe: compare two dictionary and display difference Pin
mjbaquiran20-Jan-20 19:53
mjbaquiran20-Jan-20 19:53 
GeneralRe: compare two dictionary and display difference Pin
Richard Deeming21-Jan-20 1:19
mveRichard Deeming21-Jan-20 1:19 
QuestionOleDb Error Pin
Kevin Marois15-Jan-20 8:57
professionalKevin Marois15-Jan-20 8:57 
AnswerRe: OleDb Error Pin
OriginalGriff15-Jan-20 9:03
mveOriginalGriff15-Jan-20 9:03 
GeneralRe: OleDb Error [UPDATED] Pin
Kevin Marois15-Jan-20 9:34
professionalKevin Marois15-Jan-20 9:34 
GeneralRe: OleDb Error Pin
OriginalGriff15-Jan-20 9:41
mveOriginalGriff15-Jan-20 9:41 
GeneralRe: OleDb Error Pin
Kevin Marois15-Jan-20 10:57
professionalKevin Marois15-Jan-20 10:57 
GeneralRe: OleDb Error [UPDATED] Pin
Dave Kreskowiak15-Jan-20 9:45
mveDave Kreskowiak15-Jan-20 9:45 
GeneralRe: OleDb Error [UPDATED] Pin
Kevin Marois15-Jan-20 10:51
professionalKevin Marois15-Jan-20 10:51 
GeneralRe: OleDb Error [UPDATED] Pin
Eddy Vluggen15-Jan-20 12:15
professionalEddy Vluggen15-Jan-20 12:15 

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.