If you hand a C# value type into a method signature where it gets altered and then later use the value type back in the blob of code that called the method signature, the value type will be unpolluted by the isolated changes.
This trick for reference types does NOT apply for value types. You are going to have to use ref or out at a method signature if you want the warping within to make its way back out.
No comments:
Post a Comment