Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 661001
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T23:13:12+00:00 2026-05-13T23:13:12+00:00

I get a few errors saying: The name ‘title’ does not exist in it’s

  • 0

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.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T23:13:13+00:00Added an answer on May 13, 2026 at 11:13 pm

    In your constructor for Book, what values for title, author, genre and pages are you expecting it to use? Do you expect them to be passed in to the constructor? If so, you need to modify your Book constructor to look like this:

    public Book(string title, string author, string genre, int pages, bool hardcover)
        : base(title, author, genre, pages)
    {
        Hardcover = hardcover;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have few Question for which I am not able to get a proper
I get the error Warning: printf() [function.printf]: Too few arguments Looking at the code
I'm trying to get a few web development ideas off the ground. Unfortunately I
When you right click on a file and select Compare..., you get a few
Why is Android sending this symbol?(�) What I'm doing is, get a few variables,
few days ago i asked about how to get all running processes in the
I'm looking for a few good tutorials to get me started in demo coding
After cobbling together a few questions I've managed to get this far to showing
I have quite a few libraries and models that get loaded into a controller,
I saw a few answers to this issue, and I get it — you

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.