Asked and answered over here , and it's a deep copy you want :)
Momerath
Nearly a Senior Poster
3,384 posts since Aug 2010
Reputation Points: 1,232
Solved Threads: 558
If you put that code into a file by itself, you'll be able to use it with any class that is serializable, doing this:
Position a = new Position();
Position b = a.Clone();
Momerath
Nearly a Senior Poster
3,384 posts since Aug 2010
Reputation Points: 1,232
Solved Threads: 558
It needs to be static because it is a special type of method known as an 'extension method'. It 'extends' other classes rather than being used by the class it's in.
Momerath
Nearly a Senior Poster
3,384 posts since Aug 2010
Reputation Points: 1,232
Solved Threads: 558