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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T20:57:52+00:00 2026-06-10T20:57:52+00:00

To say I have two classes: ClassA{ //properties public string NAME{set;get;} public string ID{set;get;}

  • 0

To say I have two classes:

 ClassA{
    //properties 
    public string NAME{set;get;}
    public string ID{set;get;}
    public int AGE{set;get;}
    //Methods
    public void DoSomething();
    public void MethodA();
    private void MethodB(string name);
    private void MethodC(string name);
    public void MethodD(string name,string id);
    public string getSomething(int age);
    }

    ClassB{
    public void Hello(int input);
    public void HelloWorld(string input);
    }

1) For ClassA(may have many derived classes),what is the best way to create a design interface(GUI) so that I can specify its property value

2) For ClassA, is there a way to create a design interface(GUI) so that I can specify which method to call and specify the sequence/input/output of methods called?

    public void DoSomethingWithClassA(ClassA ca ){
    ca.MethodA();
  //  ca.MethodB(ca.NAME);
  //  ca.MethodB(ca.ID);
    ca.MethodD(ca.NAME,getSomthing(ca.AGE));

    }

3) If I have an instance of ClassA, named newClassA, an instance of ClassB, named newClassB, is there a way to create a design interface(GUI) so that I can specify that newClassB could invoke newClassA’s method:

ClassA newClassA...
ClassB newClassB...

newClassB.HelloWorld(newClassA.getSomething(newClassA.AGE));

Basically what I need is to have a design interface(GUI) so that user could “visually design” his classes and could specify relation/input/output of method. I feel it’s something like filter graph.

If someone could possible figure out a solution/framework/design pattern/keywords, it would be much appreciated.

(I should highlight that design interface means GUI for user, sorry for that.)

  • 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-10T20:57:54+00:00Added an answer on June 10, 2026 at 8:57 pm

    I think you are looking for something like fluent interfaces.

    Take a look at this article, it should help you on how to implement this: http://blog.raffaeu.com/archive/2010/06/26/how-to-write-fluent-interface-with-c-and-lambda.aspx

    Here’s a quick example on how you can use this:

    public class Person
    {
        public string Name { get; set; }
        public int Age { get; set; }
    
        internal Person { }
    }
    
    public class PersonFactory
    {
        public NameSetter CreatePerson()
        {
            return new NameSetter(new Person());
        }
    }
    
    public class NameSetter
    {
        private Person person;
    
        internal NameSetter(Person person)
        {
            this.person = person;
        }
    
        public AgeSetter SetName(string name)
        {
            this.person.Name = name;
            return new AgeSetter(this.person);
        }
    }
    
    public class AgeSetter
    {
        private Person person;
    
        internal AgeSetter(Person person)
        {
            this.person = person;
        }
    
        public Person SetAge(int age)
        {
            this.person.Age = age;
            return this.person;
        }
    }
    
    public class Program
    {
        public void Main()
        {
            Person p = new PersonFactory()
                           .CreatePerson()
                           .SetName("Bob")
                           .SetAge(30);
        }
    }
    

    I updated the example to make the constructor of Person internal. It’s not mandatory but if you do so, it will force any user of your code to use the fluent interface to create an instance of a Person.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Lets say I have two classes: class A { [SortOrder(3)] public string Name {
Let's say we have these two classes: public class Base { public static int
Say you have two classes, order and customer: public class Customer{ public int CustomerId
Say i have the following two classes: public class User { public int ID
Let's say I have the following two classes: public class Person { public string
Let's say I have the following two classes: public class TestResults { public string
Say I have two classes in my CSS, say .classA{} and .classB{} , and
Let's say I have two classes: class A { public: A* Hello() { return
Say I have two independent classes: class Foo { int bar; } class Baz
Lets say I have a two classes: class A : public QObject {}; class

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.