The switch will not burn in the schematic you have provided*.
When the switch is closed (assuming 0 initial conditions), the charge current of the capacitor will be limited by the inductor. (*) Of course, if the current rating of the switch is smaller than even that limited current value, it can still be damaged.
After some time (assuming there are parasitic resistance somewhere in the circuit), the capacitor will be charged to the value of V, and the inductor will carry 0 current. Note that no energy will be stored in the inductor.
When you later open the switch, it will again not be damaged, since no current would flow through it anyway.
If we assume that all components are ideal, then the circuit will oscillate forever. In that case, if you open the switch the moment the current though it reaches its maximum, the switch may get damaged as the ideal inductor will generate potentially infinite voltage when the current though it stops. Whether an ideal switch is able to withstand infinite voltage is another question.