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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T02:18:07+00:00 2026-06-13T02:18:07+00:00

My question is rather generally phrased, therefore, I will not provide any code (unless

  • 0

My question is rather generally phrased, therefore, I will not provide any code (unless someone wants me to add it, but I think my question is clear enough).
I have been looking at two articles now about the Array.ConvertAll method and cannot for myself find a direct use of it.
The articles I read:

http://msdn.microsoft.com/en-us/library/exc45z53.aspx

“Converter” (Bottom of article): http://www.codeproject.com/Articles/117611/Delegates-in-C-Attempt-to-look-inside-Part-4

Now I understand how the converter works and how it can be used, however, I don’t see the direct necessity of it. Since the actual method of how one object is to be converted into the other, has to be fully determined (e.g. in the codeproject link the method “ConvertToPersonInfo” or the arroding Action/Lambda type delegate), is it not just possible to declare and instantiate the new array of the new objects and do a foreach-loop over the old array of the old objects and copy the desired variables within that loop?

According to the Microsoft article, the old array is not effected in any way, so the final effect will not be different.

Am I missing a point here and didn’t understand the Converter, or is it really just the same?

  • 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-13T02:18:09+00:00Added an answer on June 13, 2026 at 2:18 am

    Of course you can do it yourself. It’s just a method that simplifies the conversion by creating the array and doing the looping for you.

    For example:

     int[] newArr = new int[oldArr.Length];
     for (int i = 0; i < oldArr.Length; i++) {
       newArr[i] = Convert.ToInt32(oldArr[i]);
     }
    

    vs. just:

     int[] newArr = Array.ConvertAll(oldArr, Convert.ToInt32);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

The question is rather straightforward but not answered by searching. How do I determine
My intention in this question is not to be pedantic, but rather to explore
Excuse if this is more a file format conversion question rather than programming, but
My question is rather subjective, moderators please do not close it, for I want
my question is rather simple, if you have an pure virtual class (interface) but
A similar question was asked here , but the answers generally all seem to
(This question specifically in C#, but applies generally to .NET) I have a largish
I have a general question that is rather open-ended (i.e. depends on platform, application
So this is more of a general question about apps and techniques rather than
I would like to ask a rather, general, high-level introductory kind of question regarding

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.