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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T06:44:45+00:00 2026-05-25T06:44:45+00:00

I am working on an application for Windows Phone platform. Run into a question.

  • 0

I am working on an application for Windows Phone platform. Run into a question.

I’d 2 different List, 1 is direct read from xml file, and the other by some calculation. And I want to merge this two lists into 1, so I can display it out.

List 1:

public class studentClass1
{
    public string studentID { get; set; }
    public string studentFirstName { get; set; }
    public string studentLastName { get; set; }
}

List 2:

public class studentClass2
{
    public string studentID { get; set; }
    public string studentGradePoint { get; set; }
}

First of all, I had readout the studentClass1 via

var studentList= from query in studentIndex.Descendants("student")
                             select new driversClass
StudentList1 = studentList.ToList();

Secondly, I process the student Grade Point calculation on the function and output to the 2nd list :

studentClass2 SG = new studentClass2
            {
                studentID = thestudentID ,
                studentGradePoint  = thestudentGradePoint .ToString()
            };

            StudentList2.Add(SG);

studentListAll = StudentList1 + StudentList2

now, I want to join this two list together so that I can output to screen by calling

studentResultListBox.Itemsource = StudentListAll;

any suggestion the code how would look like?
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-05-25T06:44:46+00:00Added an answer on May 25, 2026 at 6:44 am

    Assuming you just want to combine the appropriate info from both lists (it is not totally clear from your question) – introduce a third class studentClass3 that holds all the properties you want and use a join to match instances with a matching studentID:

    var studentList3 = (from s1 in studentList1
                        join s2 in studentList2 on s1.studentID equals s2.studentID
                        select new studentClass3()
                        {
                            studentFirstName = s1.studentFirstName,
                            studentID = s1.studentID,
                            studentGradePoint = s2.studentGradePoint,
                            studentLastName = s1.studentLastName
                        }).ToList();
    

    In general this problem should be rather solved when you read in the XML than trying to combine the lists later on – having three different classes for students might be confusing. Also take a look at the recommended naming conventions, they are a little off.

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

Sidebar

Related Questions

I'm working on a Windows Phone application that displays an audioStream (as radio) but
I am working on an application in windows phone 7.And I want to whether
I'm working at Windows Phone application these days and have faced the problem with
Presently I'm working on a Windows Phone application that will work in both online
I am working on Windows Phone 7.1 application. I have a UserControl which has
I got a Windows Phone 7 application project from a friend. Now I downloaded
I am working on a Windows Phone 7 application with an SQLite Local Database
I'm working in Windows Phone 7, but I suppose the question may be Silverlight
I am working on a Silverlight based Windows Phone application that only supports landscape
I am working on a Windows phone 7 application. I am using this implementation

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.