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

  • SEARCH
  • Home
  • 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 519303
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T08:01:38+00:00 2026-05-13T08:01:38+00:00

I have this set of classes: Node (SUPER Class) |—— NodeType1 (Class) |———-NodeType2 (Class)

  • 0

I have this set of classes:
Node (SUPER Class)
|—— NodeType1 (Class)
|———-NodeType2 (Class)

There are fields that the type1 and type2 have in common (For example: NAME).
If i declare the NAME field in the SUPER class (Node) how should I access those variables in the types classes? How can i make those property’s?
Thank you for your time

  • 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-13T08:01:38+00:00Added an answer on May 13, 2026 at 8:01 am

    If the access modifier of the name field is public or protected you will be able to access it in your derived classes. The modifier public will make it visible to all other classes, while protected will restrict visibility to the derived classes.

    In either case you can just access it as you would a field declared in the current class:

    this._name = "New Name";
    

    If you wish to make it a property then set it’s access modifier accordingly:

    public class Node
    {
         protected string Name { get; set; }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a super class 'Node' and several sub classes e.g. 'SubNode1', 'SubNode2' etc.
I have this set of labels and radio buttons that look like this: Entertainment:
I have this script set up that echoes all relevant users in a database
I have something like this set up: class CategoryPage (webapp.RequestHandler): def get(self): ** DO
I have this classes: public class User { [Key] public Guid UserId { get;
So I have this two classes: public class PhysicalTest { public int ID {
I have this code (two classes) class url { private $profile_id; private $short; public
I have a class library which is a set of helper classes to develop
I have this C# class structure that I would like to refactor to use
I have a set of classes that were created by www.sudzc.com (awesome WDSL web

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.