Objet De Constructeur De Même Type De Class
Bonjour..!!
Mon probleme est simple..comment je peux creer un objet dans programme principal avec cette type de constructeur ?!! Mercii...
Voici Le code...
Voici le code
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
|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Théorique_2012
{
class Categorie
{
private string nomCat;
private Categorie categorie;
internal Categorie Categorie1
{
get { return categorie; }
set { categorie = value; }
}
public string NomCat
{
get { return nomCat; }
set { nomCat = value; }
}
public Categorie(string nomCat, Categorie categorie)
{
this.NomCat = nomCat;
this.Categorie1 = categorie;
}
public override string ToString()
{
return " Nom Categorie : " + this.NomCat + " " + this.Categorie1;
}
} |