in 提供了以只读方式传递引用参数的方式。当希望以引用的方式传递一个方法的参数,但又不希望方法修改该参数时,就可以对该参数使用 in 修饰符。该参数既可以是值也可以是变量。 Reference Links § How to use the in, out, and ref keywords in .NET Core | InfoWorld See also § 各修饰符的传参类型 ref readonly