Results 1 to 3 of 3

Thread: [RESOLVED] Serializing System.Net.Mime.ContentType?

  1. #1

    Thread Starter
    Frenzied Member tr333's Avatar
    Join Date
    Nov 2004
    Location
    /dev/st0
    Posts
    1,605

    Resolved [RESOLVED] Serializing System.Net.Mime.ContentType?

    Can anyone explain why System.Net.Mime.ContentType is not marked as Serializable? I ran into problems when using ContentType for a property type and ASP.NET complained that it couldn't serialize the class.

    I fixed it by changing the ContentType type to string, but I'm still stuck on why ContentType is not serializable.
    CSS layout comes in to the 21st century with flexbox!
    Just another Perl hacker,

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: Serializing System.Net.Mime.ContentType?

    I guess that it was never intended to be serialised. Given that the ContentType is only intended to be used with the Attachment class when sending an email, I can understand why the authors wouldn't have expected an instance to be serialised.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  3. #3

    Thread Starter
    Frenzied Member tr333's Avatar
    Join Date
    Nov 2004
    Location
    /dev/st0
    Posts
    1,605

    Re: Serializing System.Net.Mime.ContentType?

    Thanks for the info.
    CSS layout comes in to the 21st century with flexbox!
    Just another Perl hacker,

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width