Does a static method share its local variables & what happens during concurrent usage from different threads?

后端 未结 4 1752
故里飘歌
故里飘歌 2021-01-17 15:21

C# Question - I\'m trying to determine whether it is OK to use a static method where, within the method it does have some local variables it uses. Are the local variables \

4条回答
  •  慢半拍i
    慢半拍i (楼主)
    2021-01-17 15:41

    No method of any kind in C# shares local variables.

    You may be thinking of Static functions in VB.

提交回复
热议问题