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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T23:21:28+00:00 2026-06-13T23:21:28+00:00

I just want to bind one collection to another one: Lets say there is

  • 0

I just want to bind one collection to another one:
Lets say there is a

List<string> original = new List<string>();

and there is a

List<string> extended = 
           new List<string>(from curItem in originals select curItem + "_extension");

So the items of the extended are just the same than the original’s but with an “_extension” at the end.

What I want is to bind the extended to the original, so that if the original becomes changed, the extended also changes.

I know I could use events and recreate the extended every time.
But I think this is not efficient.

Edit:
Lets say: original is large and it is too exhausting to recreate the single elements of the extended and its also exhausting to create a single element at all.
So I want to have two lists (or collections) where on observes the other one and adds or removes the changes, like the data binding in Wpf, but adding an extension.

  • 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-13T23:21:29+00:00Added an answer on June 13, 2026 at 11:21 pm

    You can use the BindingList<T> class on System.ComponentModel to achieve this… maybe it’s like killing a fly with a hammer, but will serve to more complex examples.

    I think you can make an extension method like this:

    static class ExtensionMethods
    {
        public static IEnumerable<string> Extensions(this IEnumerable<string> strs)
        {
            foreach (var str in strs)
            {
                yield return str + "_extension";
            }
        }
    }
    

    And you can use this on every IEnumerable<String>:

    foreach (var x in original.Extensions())
    {
        Console.WriteLine(x);
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have added XRRichTextbox into XtraReport, i just want to bind HTML into RichTextbox
Just want to make sure one thing. In a windows machine (either a desktop
Just want to know how to read an attribute of a parent node from
I just want to add some extra text on top of input posted from
I have a SQL query that will result in one string. Rather than bind
My command object have a list of objects. I want to bind a text
Just want to ask if i can use Custom Validator in client side without
Just want to know if publishing an application on Google play is allowed using
Just want to ask can netbean IDE get connected to clearcase remote client server
Just want to do $_SERVER['PHP_SELF'] as a link with ?logout=1 appended to it. <a

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.