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 7956467
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T03:59:53+00:00 2026-06-04T03:59:53+00:00

I am just drawing a blank here. Have a class that I want read

  • 0

I am just drawing a blank here. Have a class that I want read only properties on the class but an admin type function that can update a property.

public class Group : Object, INotifyPropertyChanged
{   // this is read only admin is via UserGroupAdmin
    public event PropertyChangedEventHandler PropertyChanged;
    private void NotifyPropertyChanged(String info)
    {
        if (PropertyChanged != null)
        {
            PropertyChanged(this, new PropertyChangedEventArgs(info));
        }
    } 

    public Int16 ID { get; private set; }
    public string Name { get; private set; }
    public override bool Equals(Object obj)
        {
            //Check for null and compare run-time types.
            if (obj == null || !(obj is Group)) return false;
            Group item = (Group)obj;
            return (ID == item.ID);
        }

    public override int GetHashCode() { return (int)ID; }
    public Group(Int16 id, string name)
    { ID = id; Name = name;  }
 }

What I would like is an admin type function

public group ReviseGroupName (Group group, string revisedName)
{
   // write revised name to SQL
   // revise group.name
   // return revised group
}

The SQL part I know. What I considered was just creating a new group with the same ID and hashcode and returning it.

  • 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-06-04T03:59:54+00:00Added an answer on June 4, 2026 at 3:59 am

    If the Admin is a nested class in Group you can set the private property in the function:

    public class Group
    {
        public string Name { get; private set; }
    
        public class Admin
        {
            public Group ReviseGroupName (Group group, string revisedName)
            {
                group.Name = revisedName;
                return group;
            }
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I think my mind is just drawing a blank, but basically, I want to
This is a really stupid question, but I'm just drawing a blank here... What
Modeling tool or just a visual tool for drawing. In fact I only need
I have a pretty simple question, but for some reason I am drawing a
I know this is easy, just drawing a blank. If you look at this
I know it's possible but I'm drawing a blank on the syntax. How do
Drawing a blank with finalizing my deploy scheme here. After posting this question: Migrating
I am drawing a blank here.. I am using MVC and my model doesn’t
What am I missing here. I just want to pull the first one returned
I have an ASP Image control that I want to save to a specific

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.