je reçois quelques erreurs en disant:simple héritage Question
« Le nom « titre »n'existe pas dans son contexte actuel » « l'auteur" Le nom n'existe pas dans son contexte actuel » « Le nom « genre » n'existe pas dans son contexte actuel » « Le nom « pages » n'existe pas dans son contexte actuel »
using System;
using System.Collections.Generic;
using System.Text;
namespace ReadingMaterials
{
class Program
{
static void Main(string[] args)
{
}
public class Basic
{
protected string Title;
protected string Author;
protected string Genre;
protected int Pages;
public Basic(string title, string author, string genre, int pages)
{
Title = title;
Author = author;
Pages = pages;
Genre = genre;
}
public int PageCount
{
get { return Pages; }
set { Pages = value; }
}
public string GenreType
{
get { return Genre; }
set { Genre = value; }
}
public string AuthorType
{
get { return Author; }
set { Author = value; }
}
public string TitleName
{
get { return Title; }
set { Title = value; }
}
}
public class Book : Basic
{
protected bool Hardcover;
public Book(bool hardcover)
: base(title, author, genre, pages)
{
Hardcover = hardcover;
}
public bool IsHardcover
{
get { return Hardcover; }
set { Hardcover = value; }
}
}
}
}
Qu'est-ce que je manque ici? Merci d'avance.
Merci monsieur! Cela a fonctionné =] – Stradigos