Calculation distance from polygon centroid to a line

Discussion created by roj046 on Feb 14, 2012

I would like to calculate the distance from the centroid of each of the different polygons i have in a layer to another layer that contains a river as a line in it. So as output I would like the polygon in question of the layer and the shortest distance from that centroid to the river. I haven't done any coding in Arc yet so I'm at a bit of a lost to do this, even though I assume its pretty straightforward.