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

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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T23:39:06+00:00 2026-06-12T23:39:06+00:00

Lets say i have an array like that (I know that is not possible

  • 0

Lets say i have an array like that (I know that is not possible on c#):

string[,] arr = new string[,]
{
    {"expensive", "costly", "pricy", 0},
    {"black", "dark", 0}
};

So how I can add this items on list and how I can add new item between “pricy” and 0? I couldn’t find any example on the net.

  • 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-12T23:39:08+00:00Added an answer on June 12, 2026 at 11:39 pm

    Arrays are immutable, so you can’t really add or remove items from them. The only thing you can do for example is to copy the items to another array instance, minus the ones you don’t want, or do the same but use a higher dimension and add the items you need to add.

    I’d recommend using a List<T> here, where T could be a simple type that mirrors the things you’re adding to the array. For example:

    class Thing {
        public string Prop1 {get; set; }
        public string Prop2 {get; set; }
        public string Prop3 {get; set; }
        public int Prop4 {get; set; }
    }
    
    List<Thing> list = new List<Thing>();
    
    list.Add(new Thing() { Prop1 = "expensive", Prop2 = "costly", Prop3 = "pricy", Prop4 = 0};
    

    Then you can insert items:

    list.Insert(1, new Thing() { Prop1 = "black", Prop2 = "dark", Prop4 = 0});
    

    Not sure if this would work for you, it depends on whether your ‘jagged’ data can be made to fit into Thing. Obviously here ‘Prop1’ and so on would be the actual property names of the data you have in your array.

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

Sidebar

Related Questions

Lets say I have an array with a structure like this: $arr= Array( array(
Lets say I have an array numbers that contains the following values: int numbers
Ok so lets say I have an array that can be 0 - X
Lets say I have the following array in JavaScript: var skins = new Array('Light',
lets say we have a string[] array = {telekinesis, laureate, Allequalsfive, Indulgence}; and we
lets say I have a String like this [{ name : Ronald , firstname
Let's say that I have string: -dog--cat--d-- I would like to find all words
Lets say i have an array of arrays, of which i dont know the
Let's say you have a string that looks like this: token1 token2 tok3 And
Let's say I have an array like this: $array = array (this,is,me,and,I,am,an,array,hello,beautiful,world); How can

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.