I get a few errors saying:
"The name 'title' does not exist in it's current context" "The name 'author' does not exist in it's current context" "The name 'genre' does not exist in it's current context" "The name 'pages' does not exist in it's current context"
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; }
}
}
}
}
What am I missing here? Thanks in advance.