Hello,
I would like to load a custom file put as a resource file in my silverlight application, but the FileStream doesn't works (since I must stay in a partial trust environnment).
Is there any solution to load my file? (it is a binary serialized data).
UPDATE Answer found :
- I put my file as a "Resource" (not embedded neither content or anything else)
Loaded it like this :
StreamResourceInfo info = Application.GetResourceStream(new Uri(@"/Utilitaires;component/Resources/" + name, UriKind.Relative));
And then using the "info.Stream" property.
Now, I have an other asking. By doing like this, the file is added to the assembly (to the exe/dll), and make it a bit bigger.
But since these datas need to be loaded at the same time as the assembly, should I let them as a resource, or use another method to load them separatly? (and what should be the method? I need it to work in local as well as on a server).
Thanks,
KiTe