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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T07:54:46+00:00 2026-06-10T07:54:46+00:00

I am trying to build a data structure that can store the trial by

  • 0

I am trying to build a data structure that can store the trial by trail results of a group of different tests I am running. The test all consist of a number of trails but some of the information that I want to save and later use is different for the different tests. For example, the results of TestA might look like:

Trial(int)   WasResponseCorrect(bool)   WhichButtonWasPressed(string)   SimulusLevel(double)

   1                  false                         "Up"                         3.5
   2                  true                          "Left"                       6.5

Where TestB might have different types of result fields:

Trial(int)    WasResponseCorrect(bool)    ColorPresented(string)    LetterPresented(char)     LetterGuessed(Char)
  1                     false                      green                     G                        C

  2                     false                      blue                      H                        F

I was thinking of creating a dictionary with the field names as the keys (ex. WasResponseCorrect) and an array of the field values as the values of dic. I can’t figure out how to do that. Maybe there is a better way to store the information but I can’t think of how to do it. I am working with .net (VB and C#) but I think I can understand and convert most any code if you know of examples in other languages. Thanks!

  • 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-10T07:54:47+00:00Added an answer on June 10, 2026 at 7:54 am

    Without knowing more about your requirements (how you are going to store the data, for example), it seems like polymorphism is what you’re looking for. That is, you have a superclass (called Trial) and subclasses that represent the specific trial types. For example:

    public class Trial {
        public int Id { get; set; }
        public bool WasResponseCorrect { get; set; } // if this is in every type of trial
        // anything else that is common to ALL trial types
    }
    
    public class TrialA : Trial {
        public string WhichButtonWasPressed { get; set; }
        public double SimulusLevel { get; set; }
    }
    
    public class TrialB : Trial {
        public string ColorPresented { get; set; }
        public char LetterPresented { get; set; }
        public char LetterGuessed { get; set; }
    }
    

    That way you can have a list of Trial objects, but the actual runtime type of those objects can be TrialA or TrialB.

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

Sidebar

Related Questions

I am trying to build a data table structure that will best support the
I am build a data structure using multidimensional associative arrays. Can I update that
I am trying to build a Quadtree data structure(or let's just say a tree)
I am trying to build a BehaviourTree data structure. The main class is BTNode,
We are trying to build a SOLR index with data coming from 2 different
I am trying to build a website where I can read the data from
I'm trying to create a data extractor algoritm from group buying sites to build
I have 2 databases that have the same structure, but different data. Both are
I'm trying to build up the proper data structure using a pseudo tcp header,
I'm trying to use hibernate to build up a local cache of data that

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.