Particle system renderer runtime access

Hello,
is it possible to access this particle system renderer settings from script at runtime?
118748-renderer-settings.jpg

I’d like to change material for some runtime generated one. Is it possible?

Nevermind, found it.
There is whole class called ParticleSystemRenderer and accessing it from ParticleSystem object is simple as:

particleSystem.GetComponent<ParticleSystemRenderer>()