Using C# 7.2 in modifier for parameters with primitive types
问题 C# 7.2 introduced the in modifier for passing arguments by reference with the guarantee that the recipient will not modify the parameter. This article says: You should never use a non-readonly struct as the in parameters because it may negatively affect performance and could lead to an obscure behavior if the struct is mutable What does this mean for built-in primitives such as int , double ? I would like to use in to express intent in code, but not at the cost of performance losses to