How to freeze/hide layer in Viewport with C#?

Hi,

I want to hide a layer in some viewport and show it in other viewports with c#. Does anyone have an example code of how this can be done?

Thanks in advance!

Comments