Oligomers with a dimethylsiloxane backbone coated as thin films on different substrate surfaces were thermally as well as photochemically cross-linked. The structure and the degree of cross-linking were examined spectroscopically. Diffusion of different gases in the thin polymer films was measured by time resolved infrared ATR-spectroscopy. The process of diffusion is almost immediately followed by a swelling of the polymer proportional to gas concentration. Therefore diffusion may also be measured by spectral interferometry, giving a very sensitive device for optical sensing of hydrocarbons. Furthermore, diffusion in polymers may be measured very accurately by spatially resolved UV/Vis-spectroscopy. Diffusion coefficients may also be determined indirectly from the equilibrium of monomers and excimers indicated by the fluorescence intensities. This method allows the in situ observation of the cross-linking process.