add example for pinned collections

tested and working (codegen needs a quick fix for static members)