Serialization of custom class

Feb 5, 2013 at 5:00 PM

While I understand this may not be a problem with your code, as I'm out of ideas this is a last ditch attempt for help, but using the ObjectStorageHelper for a custom class "person", I keep encountering this error on the line where I declare the ObjectStorageHelper:

"System.Runtime.InteropServices.WindowsRuntime.RuntimeClass is inaccessible due to its protection level. Only public types can be processed."

From research I understand that this ought to relate to my class but I can't see anything that isn't public:
public class person
            public string myName;
            public string myPhonenum;

            public person() { }
So I was more wondering if you'd encountered this error at any point during development and could offer any advice?

Thanks for any feedback and much appreciation for this tool!

Feb 5, 2013 at 5:25 PM
Hi mercurygal,
Oh dear. I wish I had a simple answer for you but I'm afraid I do not. While I did build ObjectStorageHelper I must confess that .Net development is not my strongpoint - in fact part of the reason for building ObjectStorageHelper was to further my own limited knowledge.

From what you have said I really can't understand why this is happening. Does it happen if you use a different class other than person for T?

Feb 5, 2013 at 5:37 PM
No problem, I suspected that might be the case!

The problem doesn't seem to occur with a string object type (not that there aren't other problems) but any other custom class I create throws the same error. It's okay, I was more wondering if you'd come across it before! I'll keep digging, in the morning when I have stopped hating the sight of code! :)

Thanks anyway!