Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8910101
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T03:36:12+00:00 2026-06-15T03:36:12+00:00

When designing custom exceptions for .NET, MSDN provides these guidelines . In particular, the

  • 0

When designing custom exceptions for .NET, MSDN provides these guidelines. In particular, the guidelines state that a custom exception:

  • should be serializable, i.e. implement ISerializable and be decorated with the [Serializable] attribute, and
  • should implement the (de)serialization constructor, i.e. protected CustomException(SerializationInfo info, StreamingContext context).

However, in a Portable Class Library neither of SerializableAttribute, ISerializable and SerializationInfo are supported.

How should I sufficiently design a custom exception in a Portable Class Library that simultaneously targets .NET Framework and one or more platforms?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T03:36:13+00:00Added an answer on June 15, 2026 at 3:36 am

    Basically, ignore that guidance – that is for full .NET, and does not apply to portable class library projects. Indeed, if we look at (say) Silverlight (which includes WP7) we see:

    [ClassInterfaceAttribute(ClassInterfaceType.None)]
    [ComVisibleAttribute(true)]
    public class Exception
    

    Frankly, the main consumer of that requirement was remoting… and that is not in huge demand now.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Possible Duplicate: Should I derive custom exceptions from Exception or ApplicationException in .NET? I've
I'm designing my own custom control that contains a .NET dropdownlist. What I'm wondering
I am designing a custom button with that requires me to overlay a UIButton
In my app, I'm designing a custom picker that allows the user to choose
I'm designing a custom product page with a button that when clicked I need
I'm in need of help designing a schema for a custom CMS, with these
I am designing a web interface to a certain hardware appliance that provides its
I am designing a custom widget which is basically a QGroupBox holding a configurable
I am designing a custom HTML helper and I would like to execute Html.ActionLink
I am creating a custom Table by designing my own UITableViewCell in Xcode and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.