简体   繁体   中英

What can be stored in a resource.resx file?

In a C# project, is it possible to store more than just strings in the resources.resx file? Specifically, I was curious to know if I could take a simple data-object defined in my project, and store an instance of it in the resource file to pull out during runtime.

I figure I probably can do this if I serialize my object first, then put the serializer output in the resource file, but I was hoping to be able to have the object strongly-typed when I pull it out.

Any thoughts?

在此输入图像描述

So you could store your object as a binary or XML file and deserialize it back but a resource file seems uncommon place to store such things.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM