Exception class

Posted on 2006-03-26
Last Modified: 2010-04-16
I'm really confused with this exception handling. So I'm trying to understand this stuff piece by piece. I have to create an exception class with a constructor whose receives a string which consists of an candy flavor and number of bars. This is what I have :

public class CandyBarException : ApplicationException
          private static string msg =
          public CandybarException (string flavor, int bar) :  base (msg)

Can one exception Have more than on message.

Question by:augie0216
    1 Comment
    LVL 11

    Accepted Solution

    The exception cannot have more than one message since the constructor only accepts on string(message) as parameter

    Featured Post

    Gigs: Get Your Project Delivered by an Expert

    Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

    Join & Write a Comment

    Bit flags and bit flag manipulation is perhaps one of the most underrated strategies in programming, likely because most programmers developing in high-level languages rely too much on the high-level features, and forget about the low-level ones. Th…
    It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
    Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…
    This video discusses moving either the default database or any database to a new volume.

    734 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    24 Experts available now in Live!

    Get 1:1 Help Now