In my code, I want to change the visibility of one single layer in a dynamic map service and keep the visibility of the rest layers in that map service the same as before. How could I fulfill it?
You can use this sample: http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#SubLayerList. If you know which sub layer you want to turn off, then make sure that you don't add it to your visibleLayers, regardless of the result of this check (layer.DefaultVisibility). Skip the following lines for layer that you want to turn off.
if (layerInfoArray[index].DefaultVisibility)
visibleLayerIDList.Add(index);