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

The Archive Base Latest Questions

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

My question is: What is the most efficient and correct, for large set of

  • 0

My question is: What is the most efficient and correct, for large set of data ?

 _pointBuffer1 = new Point3DCollection {  
            new Point3D(140.961, 142.064, 109.300), new Point3D(142.728, 255.678, (...)

— or —

_pointBuffer1.Add(new Point3D(140.961, 142.064, 109.300)); _poitBuffer1.Add(142.728, (...)

Or is it the same ?

Point3D is declared as a Point3DCollection, but my question is for any object collection (could be Int32 for example) ..

  • 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-13T06:55:07+00:00Added an answer on May 13, 2026 at 6:55 am

    Both are compiled to the same IL. Collection initializers are just syntactic sugar. They will call the Add method. Example:

    var res = new List<int>() { 1, 2, 3 };
    

    is compiled to:

    List<int> <>g__initLocal0 = new List<int>();
    <>g__initLocal0.Add(1);
    <>g__initLocal0.Add(2);
    <>g__initLocal0.Add(3);
    List<int> res = <>g__initLocal0;
    

    The only difference is an additional local variable being declared.

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

Sidebar

Related Questions

I'm new in this subject so this might be a silly question for most
I have a quick question re. the most efficient way to loop through multiple
We are currently investigating the most efficient way of communicating between 120-140 embedded hardware
I have a simple question about the most efficient way to perform a particular
i have a more or less general question about using coredata the most efficient
Simple question: Which is the most efficient way of performing a substituion like: Some
This question is a follow up to this post: What is the most efficient/elegant
Main question: What is the most efficient bug free method of lazy loading remote
so just a general question on what people think is the most efficient method
I have a question regarding the most efficient way to design a class that

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.