WIP Better exceptions

Check for duplicate keys on creation for .net
WIP Better exceptions

Refactor .net duplicate key checking. Implement `GetDynamicMemberNames` to remove duplicate code.