I am Working in asp.net and c#.I have a datatable in my application with one column.I want to iterate through that column values and check those values with someother value.please tell me how to do that.I tried it with foreach but its not working.Code:\[code\] foreach (DataRow dr in dt.Rows) { int code = Convert.ToInt32(dt.Rows[0]["Code"]); if (code == pcode) { //do something } else { } }\[/code\]Note:dt is my datatable with column code.I want to compare all values in column code with pcode.