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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T15:32:40+00:00 2026-06-02T15:32:40+00:00

i do have 2 c# declaration table , it column initialise during the creation

  • 0

i do have 2 c# declaration table , it column initialise during the creation of the program.

i wanted to join this table base on its UserID and UserName.

My Code is like following

from nSJL in UserList.AsEnumerable()
join SJL in UserListOnline.AsEnumerable()
on
new { nSJL.Field<int>("UserID"), nSJL.Field<string>("UserName") }
equals
new { nSJL.Field<int>("UserID"), nSJL.Field<string>("UserName") }
into sjList

in this code i am getting the error

Invalid anonymous type member declarator. Anonymous type members must be declared with a member assignment, simple name or member access.

Anyway to join anonymous type?

  • 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-02T15:32:41+00:00Added an answer on June 2, 2026 at 3:32 pm

    You need to specify the names for the anonymous type properties:

    from nSJL in UserList.AsEnumerable()
    join SJL in UserListOnline.AsEnumerable()
    on
    new { UserID = nSJL.Field<int>("UserID"),
          UserName = nSJL.Field<string>("UserName") }
    equals
    new { UserId = SJL.Field<int>("UserID"),
          UserName = SJL.Field<string>("UserName") }
    into sjList
    

    Note that I’ve also changed the right hand side of the join to use SJL rather than nSJL too, as otherwise it’s invalid. It would help your code’s clarity if you’d use rather more meaningful names though…

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

Sidebar

Related Questions

I have a declarative table defined like this: class Transaction(Base): __tablename__ = transactions id
I have a table declaration: TYPE PERSON_TYPE AS OBJECT (ID NUMBER(38), NAME VARCHAR2(20)); TYPE
If I have this float array declaration: float tables[10]; How can I change the
I would like to have declaration like this: void Date::get_days_name(const Date& = this) which
It seems I can't easily have an XSD declaration for this simple XML <root>
I have a mysql table called pollOfTheWeek. It has a column pollDate of type
Suppose I have database table TABLE1 and there is Column COLUMN1 . The variable
I have a table called Order_List that contains a list of orders. Each column
How do I style one column on my table to not have any borders?
Say I have the following table (where History is an xml column): Id Value

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.