On Sep 15, 2011, at 1:59 PM, Mittchel Van Vliet wrote:
> Further; I'm definitely going to exceed the 1MB limit.. so how does the
> Resources option work? haha:P
Add your file to the project, and set the Build action to "Embed as resource,"
and optionally set the Resource ID.
At runtime, you can do:
var destPath = Path.Combine (
System.Environment.GetFolderPath(System.Environment.SpecialFolder.Personal),
"items.db3");
using (System.IO.Stream source =
System.Reflection.Assembly.GetExecutingAssembly().GetManifestResourceStream("resource
name"))
using (var dest = System.IO.File.Create (destPath)) {
source.CopyTo (dest);
}
Note, however, that if the resource will be sizable, it'll likely take a
noticeable amount of time. Don't do this in the UI thread. :-)
- Jon
_______________________________________________
Monodroid mailing list
[email protected]
UNSUBSCRIBE INFORMATION:
http://lists.ximian.com/mailman/listinfo/monodroid