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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T12:13:00+00:00 2026-06-01T12:13:00+00:00

Basically I have a part of my program (it’s for Vector solving) that is

  • 0

Basically I have a part of my program (it’s for Vector solving) that is supposed to take data from two lists (listVectorMagnitude and listVectorAngle), and then run them through a function
in a separate class (vectorXComponent), and then return the value. How exactly would I go about taking the first value in listVectorMagnitude, the first value in listVectorAngle, and then use them as parameters in the vectorXComponent function? It would iterate over this process for as many values are in the lists. Thank you.

  • 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-01T12:13:01+00:00Added an answer on June 1, 2026 at 12:13 pm

    You didn’t give a lot of detail. I’ll assume that you have an instance of a class Bar named bar, and that class has a method named vectorXComponent. Additionally, I assume that the return type of Bar.vectorXComponent is Foo.

    The modern functional way:

    var xComponents = listVectorMagnitude.Zip(
                          listVectorAngle,
                          (x, y) => bar.vectorXComponent(x, y)
                      );
    

    Or, an old-fashioned for loop:

    List<Foo> xComponents = new List<Foo>();
    for(int i = 0; i < listVectorMagnitude.Count; i++) {
        xComponents.Add(bar.vectorXComponent(
            listVectorMagnitude[i],
            listVectorAngle[i])
        );
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I currently have a program that basically reads html from a webpage. After sending
I have two lists. The types of both lists inherit from the same base
I have a requirement to send data from native program written in C through
Ok, so basically I have this part of the .htaccess partly working, but not
I basically have 7 select statements that I need to have the results output
I used the following piece of code to read data from files as part
I have a weird problem with aRuby program I'm writing. Basically the idea is
The above program i have typed in linux. It basically has to connect a
I'm having trouble with a little program I'm making. Basically I have 6 Classes.
Here's the thing... I have 2 GUI programs. A Menu Program,which is basically 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.