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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T01:09:59+00:00 2026-06-13T01:09:59+00:00

i want to translate this line of code from php to asp.net $subid[$value[‘parentid’]][] =

  • 0

i want to translate this line of code from php to asp.net

$subid[$value['parentid']][] = $value['id'];

i’m not familiar with asp.net data structure, i’ve tried arraylist but can’t insert at [1], dictionary do not allow duplicated keys, anyone have ideas?

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-13T01:10:01+00:00Added an answer on June 13, 2026 at 1:10 am

    I’m not familiar with PHP (anymore) and SO is not a translation service, but you can use

    • List<Tuple<int, int>>

    or

    • Lookup<int, int>

    instead (assuming that your ids are ints).


    var list = new List<Tuple<int, int>>();
    list.Add(Tuple.Create(1, 1));
    list.Add(Tuple.Create(1, 2));
    list.Add(Tuple.Create(2, 3));
    list.Add(Tuple.Create(2, 4));
    list.Add(Tuple.Create(3, 5));
    

    With Enumerable.ToLookup you can create a Lookup.

    var lookup = list.ToLookup(t => t.Item1, t => t.Item2);
    

    Find all products with parent-id = 1:

    var parentID1 = lookup[1];
    foreach (var value in parentID1)
        Console.Write(value);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to translate all the keys from the array that occur in this
This is what i want to do: $line = 'blabla translate(test) blabla'; $line =
I'm trying to translate this line of Javascript code to Jquery. The problem i'm
I'm trying to translate some code from VB.Net to C#, but I've run into
I've got a command line curl bit of code that I want to translate
I want to execute this script (view source) that uses Google Translate AJAX API
I have some query.i want to translate from one language to another langugae.i am
I'm working on translating some php code to Python. I'm not an expert in
I have this line of code in MATLAB, written by someone else: c=a.'/b I
So I found this code: #!/usr/bin/python import sys #for cmd line argv import time

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.