[C#][2.0]Pb d'accès a une classe
Bonjour à tous,
Je developpe actuelement un projet winform sous C# et dans l'arborescence de ma solution j'ai 2 répertoires(BusinessData et BusinessObject).
Dans mon repertoire BusinessData j'ai une interface IStoreData
Code:
1 2 3 4 5 6 7 8
|
interface IStoreData
{
// Méthode qui charge les données
void LoadData();
// Méthode de sauvegarde des données
void SaveData();
} |
une classe LogicielsStoreXML
Code:
1 2 3 4
|
class LogicielsStoreXML:Logipark.BussinessObject.Logiciels
{
} |
et dans mon dossier BusinessObject
J'ai une classe Logiciel qui stocke les infos sur les logiciels que gèrent mon application.
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132
| class Logiciel
{
private System.Guid m_ID;
private string m_Nom;
private string m_Format;
private string m_Editeur;
private string m_Version;
private string m_Type;
private bool m_Statut;
private string m_Image;
public Logiciel()
{
//throw new System.NotImplementedException();
m_ID = System.Guid.NewGuid();
}
public System.Guid ID
{
get
{
//throw new System.NotImplementedException();
return m_ID;
}
set
{
m_ID = value;
}
}
public String Nom
{
get
{
//throw new System.NotImplementedException();
return m_Nom;
}
set
{
m_Nom = value;
}
}
public String Format
{
get
{
//throw new System.NotImplementedException();
return m_Format;
}
set
{
m_Format = value;
}
}
public String Couleur
{
get
{
//throw new System.NotImplementedException();
return m_Editeur;
}
set
{
m_Editeur = value;
}
}
public String Version
{
get
{
//throw new System.NotImplementedException();
return m_Version;
}
set
{
m_Version = value;
}
}
public String Type
{
get
{
//throw new System.NotImplementedException();
return m_Type;
}
set
{
m_Type = value;
}
}
public Boolean Statut
{
get
{
//throw new System.NotImplementedException();
return m_Statut;
}
set
{
m_Statut = value;
}
}
public string Image
{
get
{
return m_Image;
}
set
{
m_Image = value;
}
}
public String GetNom()
{
throw new System.NotImplementedException();
}
public Boolean Existe(string Nom)
{
throw new System.NotImplementedException();
}
} |
et une seconde classe abstraite Logiciels qui implémente l'interface IStoreData
Code:
1 2 3 4 5 6
| abstract class Logiciels:Logipark.BusinessData.IStoreData
{
public List<Logiciel> ListLogiciels = new List<Logiciel>();
public abstract void LoadData();
public abstract void SaveData();
} |
Comme vous l'aurez remarqué plus haut ma classe LogicielsStoreXML hérite de la classe abstraite Logiciels.
Alors mon problème est qu'au debuggage j'ai une exception me disant que ma classe LogicielsStoreXML n'est pas accessible et que seul les types public sont gérés.
Merci de bien vouloir maider