1
Answer

Copy a class in c#

Pedro Moreira

Pedro Moreira

17y
2.1k
1

Hello,

I Want to pass a class to a function but and, in the function, do  a variety of tests to the class that modify it.

How do I create a copy of the class in order to modify the copy instead of the original, since reference types are always passed by reference?

Thank you

 

Answers (1)