Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Inconsistent accessibility....
Message
De
10/11/2009 08:43:21
 
 
À
10/11/2009 08:37:54
Timothy Bryan
Sharpline Consultants
Conroe, Texas, États-Unis
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Divers
Thread ID:
01433930
Message ID:
01433987
Vues:
33
>>>I'm not sure why I'm getting this error. First I created an enum in my static main class called csWorkITApp:
>>>
>>>
>>>public enum ItemTypes
>>>{
>>>    None,
>>>    Root,
>>>    Clients
>>>}
>>>
>>>
>>>Then I created a class that refers to it:
>>>
>>>
>>>public class csNodeInfo
>>>{
>>>    private csWorkITApp.ItemTypes _ItemType = csWorkITApp.ItemTypes.None;
>>>    public csWorkITApp.ItemTypes ItemType
>>>    {
>>>        get { return _ItemType; }
>>>        set { _ItemType = value; }
>>>    }
>>>
>>>    private DataAccess.AppDataAccess _DataRecord = null;
>>>    public DataAccess.AppDataAccess DataRecord
>>>    {
>>>
>>>        get { return _DataRecord; }
>>>        set { _DataRecord = value; }
>>>    }
>>>}
>>>
>>>
>>>
>>>It's erroring on
public csWorkITApp.ItemTypes ItemType
saying
>>>
>>>"Inconsistent accessibility: property type '...csWorkITApp.ItemTypes' is less accessible than property '...csNodeInfo.ItemType'"
>>>
>>>Anyone?
>>
>>That should work assuming that the enum was defined as you stated:
public static class csWorkITApp
>>    {
>>        public enum ItemTypes
>>        {
>>            None,
>>            Root,
>>            Clients
>>        }
>>    }
>
>Viv, is it possible that csWorkITApp is not public?
>Tim

That's certainly the most likely problem.....
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform