In Visual Basic .NET, I can see different keyword for the same(?) concept:
• methods Shared • properties Shared • class-level variables Shared BUT • local variables Static
Why there is
Static and not
Shared in case of local variables? Does different keyword indicate a different concept? Or is it only due to historical reasons?
To be clear - I understand that both static and shared variables are allocated on heap instead of stack and retain their value independently of instances. I would expect the same keyword then.