SPSite spsite1=new SPSite(SPContext.Current.Web.URL);

SPSite spsite2=SPContext.Current.Site;


What is the difference and when do we decide which one to use?

I feel both give us the site collection object.

Example: SPWeb spweb=spsite1.RootWeb; will mean same as spsite2.RootWeb;  Then why are there 2 ways to do it?


Question: Does changing the gap between plates change the capacitor voltage?
Answer: Yes, the voltage increases.  It seems most of us learned of this in school.  My Physics professor had a setup with movable plates, and a very sensitive (actually, very high impedance) voltmeter.  As the plates were pulled apart, the voltage went up.

This comes from the elemental formula Q=CV.  Pulling the plates apart lowers the capacitance.  The charge didn't go anywhere, so the voltage must rise.  This may seem counterintuitive, but the charge on the plates want to attract each other, and you are doing work by pulling them apart.

You can reproduce the experiment described above if you have a voltmeter with an FET input (or an oscilloscope, if you're that fortunate).  Ground the negative lead and hold the other lead in your hand.  If your shoes are not conductive, and you don't have any ESD straps connected, you should be able to deflect the meter simply by raising and lowering your foot.  By the way, rubbing the carpet creates the charge and picking up your feet and moving away is what raises those static charges to such high voltage levels.

On a practical note, this is how an electret condenser microphone works.   As the diaphragm vibrates, the capacitance between it and a fixed plate changes, and the voltage changes with it.