bolt pattern (5x120), the same wheel offset range (10mm-28mm), and the same wheel hub size (72.56mm)...EXCEPT the E39 5 series which has a larger hub (74.1mm).
What you need to watch is what size tire you mount to these wheels. You should try to maintain the original circumference/diameter so that the odometer and speedometer dont' get too far off.
You can go to www.tirerack.com or find a tire size calculator (google it) to find out what size tire you need