aewarnick Posted June 21, 2003 Posted June 21, 2003 I have been trying to get my manifested resouces from my app directly into an object variable but I cannot find a method to do it. Bitmap.FromStream() seems to do this. But how can I do this? Stream s= Assembly.GetCallingAssembly().GetManifestResourceStream(name); object o= //Get Object from Stream Code Here. Quote C#
*Gurus* divil Posted June 21, 2003 *Gurus* Posted June 21, 2003 Look in to serialization, which is converting an object to data which is persistable. The Bitmap class has a custom serializer/deserializer which can operate on a byte array of bitmap data rather than serialized data describing the class itself, that's how it works. Quote MVP, Visual Developer - .NET Now you see why evil will always triumph - because good is dumb. My free .NET Windows Forms Controls and Articles
aewarnick Posted June 21, 2003 Author Posted June 21, 2003 Oh, ok, so Images are an exception to serialization. I tried serialization but because it did not work on an Image I asked this question. Are Images the only exception? Quote C#
*Gurus* divil Posted June 21, 2003 *Gurus* Posted June 21, 2003 Anything that implements ISerializable can control its serialization very precisely. It's probably worth looking up the interface in the help and see if it gives you a list of classes that implement it. Quote MVP, Visual Developer - .NET Now you see why evil will always triumph - because good is dumb. My free .NET Windows Forms Controls and Articles
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.