The Snatch Pattern

added by KodefuGuru
10/20/2010 8:48:55 AM

0 Kicks, 72 Views

I named this pattern, or anti-pattern, after Invasion of the Body Snatchers. The gist is that you’re writing managed code, and you have one type that you’d like to treat as another. The instance is going to be snatched and the same reference returned imitating a different type… kind of like pointers! Only, I didn’t use pointers. This is done with managed code.