you could run the foreach query by the desired keys only:

foreach ( var item in datalist.where( i => i.key == "name" ) )
    //use name items

this uses linq to include only the keyvaluepairs where key is "name". you will have to add using system.linq to the top of your source code file for this to work properly.

Related Query