Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Referring to enums
Message
De
28/01/2011 08:32:10
Timothy Bryan
Sharpline Consultants
Conroe, Texas, États-Unis
 
 
À
28/01/2011 08:19:40
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Divers
Thread ID:
01497627
Message ID:
01497629
Vues:
41
Hi Frank,

Is this in its own code file. try:
public enum StatusCode
Tim

>Hi,
>
>I have an enum defined in a partial class of a Business Object (all my BOs are in one project) like this:
>
>
        enum StatusCode
>        {
>            Pending = 1,
>            InForce = 2,
>            Withdrawn = 3,
>            Postponed = 4,
>            Deferred = 5,
>            Cancelled = 6,
>            Claimed = 7,
>            Matured = 8,
>            Lapsed = 9,
>            Surrendered = 10,
>            DeathNotice = 11
>        }
>
>This lets me refer to the enum in code in the partial class no problem, like this:
>
>
this.Entity.Status = StatusCode.Pending;
>
>However, if I want to use this enum in the interface project (separate to the BO project, but part of the overall solution) I can't as the compiler does not recognise it. Is there some way to make this enum available outside of the BO? Or is this bad design?
Timothy Bryan
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform