Muhammad Shah

Muhammad Shah

  • NA
  • 4
  • 2.7k

Comparison based result in DataGridView

Jan 30 2016 9:26 AM

srNo

Summer

Decision

Temperature

Row1

Hot

Yes

25

Row2

Hot

Yes

36

Row3

Cold

No

45

Row4

Cold

No

52

Row5

Hot

No

52

Row6

Hot

No

74

Row7

Cold

Yes

25

By using the DataGridView I want to get such result in c# asbelow:

using  comparision Tecnique

Comparing Row1 And Row2 the result 1+1+0=2

Comparing Row 1 to Row3 the result is 0+0+0=0

Comparing Row 1 to Row4 the result is 0+0+0=0

Comparing Row 1 to Row5 the result is 1+0+0=1

Comparing Row 1 to Row6 the result is 1+0+0=1

Comparing Row 1 to Row7 the result is 0+1+0=1

this table I have made in dataGridView .I
I only need answer that is highlighted  in red .
Please Help me