static local variable

Putting the keyword static in front of a local variable declaration creates a special

type of variable, a so-called static local variable. This variable keeps its value even

after the method ends. The next time you call this method, the variable isn’t

created anew but the existing one is used. You still can’t use the variable outside of

the method (it remains local) but it will stay alive once it has been created.

上一篇:MSIL实用指南-闭包的生成和调用


下一篇:hdu 5147 Sequence II