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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T06:37:55+00:00 2026-05-26T06:37:55+00:00

I have a bunch structure arrays like listed below that Id like to port

  • 0

I have a bunch structure arrays like listed below that Id like to port over to C#. This is a part of a big project. How can I easily achieve something like this in C# ? Such as grouping variables ? I know a class will do but to do something like this Id perhaps have to create a number of nested classes ?

robot.task.mapBuilding.exploration.isExploring = 0;
robot.task.mapBuilding.exploration.initialiseAreaExploration = 1;
robot.task.mapBuilding.exploration.isInExplorationArea = -1;
robot.task.mapBuilding.exploration.lists.canRequestNewTask = 1;
robot.task.mapBuilding.exploration.lists.requestNewTask = [];
robot.task.mapBuilding.exploration.lists.receivedNewTask = [];

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-26T06:37:56+00:00Added an answer on May 26, 2026 at 6:37 am

    I don’t know anything about matlab, but based on what you have shown above you could have a class library with a robot.task.mapbuilding namespace but it would require some classes and nested as you say.
    For example an exploration class that contains a lists class:

    namespace robot.task.mapBuilding
    {
        public class lists
        {
            public lists()
            {
                _canRequestNewTask= true;
            }
            private bool _canRequestNewTask;
            private string _requestNewTask;
            private string _receivedNewTask;
            public bool CanRequestNewTask {get{return _canRequestNewTask;}set{_canRequestNewTask=value;}}
            public string RequestNewTask{get{return _requestNewTask;}set{_requestNewTask=value;}}
            public string ReceivedNewTask {get{return _receivedNewTask;}set{_receivedNewTask=value;}}
        }
    
        public class exploration
        {
            public exploration()
            {
                isExploring = false;
                initialiseAreaExploration = true;
                isInExplorationArea = -1;
            }
            private bool _isExploring;
            private bool _initialiseAreaExploration;
            private bool _isInExplorationArea;
            private lists _lists;
    
            public bool IsExploring {get{return _isExploring;} set{_isExploring = value;}}
            public bool InitialiseAreaExploration{get{return _initialiseAreaExploration;}set{_initialiseAreaExploration=value;}}
            public bool IsInExplorationArea {get{return _isInExplorationArea;}set{_isInExplorationArea=value;}}
            public lists Lists {get{return _lists;}set{_lists=value;}}
       }
    }
    

    edit

    If you’re not bothered about value validation or initialisation on construction then this could be wittled down to:

    namespace robot.task.mapBuilding
    {
        public class lists
        {
            public bool CanRequestNewTask {}
            public string RequestNewTask {}
            public string ReceivedNewTask {}
        }
    
        public class exploration
        {
            public bool IsExploring {}
            public bool InitialiseAreaExploration {}
            public bool IsInExplorationArea {}
            public lists Lists {}
        }
    }
    

    Note that I’ve kept to the property naming convention of starting with capitals, although I haven’t done so with the classes (which I suppose I should have done really).

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

Sidebar

Related Questions

I have a bit of a complicated structure that I have listed below. Basically
I have bunch of lists like this: out[3] [[3]] [1] forum=28&mid=11883 [2] forum=29&mid=11884 out[4]
I have a bunch of code in a routine that looks a bit like
I have a bunch of name-parentname pairs, that I'd like to turn into as
I have this Linked Web(?) data structure ie. each object has a bunch of
I have a bunch of strings structured like this one Trim(2714,8256)++Trim(10056,26448)++Trim(28248,49165) and what I
I have a bunch of files in a single directory that I would like
I have an object that represents a physical structure (like a utility pole), and
I have bunch of strings, some of which are fairly long, like so: movie.titles
I have a bunch of html files that come with my app and are

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.