MSDN documentation error? “If the procedure is Shared, all its local variables are automatically shared. This includes the Static variables.”

前端 未结 2 1796
温柔的废话
温柔的废话 2021-01-21 19:22

I was reviewing the MSDN documentation on VB.Net\'s little-used Static keyword for local variables. My question is not about how Static works (I personally plan

2条回答
  •  长情又很酷
    2021-01-21 19:44

    That particular piece of documentation is wrong. Local variables declared in a Shared method are no different than locals declared in a non-Shared method. The only behavior difference for locals comes into play with they are declared with the Static modifier.

    I'll alert the appropriate team about it.

    EDIT

    The team in charge of the documentation was alerted and will be correcting the documentation in the very near future.

提交回复
热议问题