Threading and static methods in C#

后端 未结 3 1668
广开言路
广开言路 2021-02-19 20:54

Here is a meaningless extension method as an example:

public static class MyExtensions
{
    public static int MyExtensionMethod(this MyType e)
    {
        in         


        
3条回答
  •  心在旅途
    2021-02-19 21:23

    Yes, that's a correct assessment. x is a method-local variable, and won't be shared between invocations of MyExtensionMethod.

提交回复
热议问题