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

  • Home
  • SEARCH
  • 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 840319
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T05:36:14+00:00 2026-05-15T05:36:14+00:00

How to differentiate between two select new fields e.g. Description c.Description and lt.Description DataTable

  • 0

How to differentiate between two select new fields e.g. Description

c.Description and lt.Description

    DataTable lDt = new DataTable();
    try
    {

        lDt.Columns.Add(new DataColumn("AreaTypeID", typeof(Int32)));
        lDt.Columns.Add(new DataColumn("CategoryRef", typeof(Int32)));
        lDt.Columns.Add(new DataColumn("Description", typeof(String)));
        lDt.Columns.Add(new DataColumn("CatDescription", typeof(String)));

        EzEagleDBDataContext lDc = new EzEagleDBDataContext();
        var lAreaType = (from lt in lDc.tbl_AreaTypes
                            join c in lDc.tbl_AreaCategories on lt.CategoryRef equals c.CategoryID
                            where lt.AreaTypeID== pTypeId
                            select new { lt.AreaTypeID, lt.Description, lt.CategoryRef, c.Description }).ToArray();

        for (int j = 0; j< lAreaType.Count; j++)
        {
            DataRow dr = lDt.NewRow();
            dr["AreaTypeID"] = lAreaType[j].LandmarkTypeID;
            dr["CategoryRef"] = lAreaType[j].CategoryRef;
            dr["Description"] = lAreaType[j].Description;
            dr["CatDescription"] = lAreaType[j].;
            lDt.Rows.Add(dr);
        }
    }
    catch (Exception ex)
    {
    }
  • 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-15T05:36:15+00:00Added an answer on May 15, 2026 at 5:36 am

    You can give them an explicit name when selecting:

    select new { lt.AreaTypeID, LtDescr = lt.Description, lt.CategoryRef, CDescr = c.Description }
    

    And then:

            dr["Description"] = lAreaType[j].LtDescr;
            dr["CatDescription"] = lAreaType[j].CDescr;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

How can I differentiate between two local branches in git ? How can I
How can we differentiate between var foo; and var foo=undefined; ? typeof foo will
I created some code to differentiate between two usergroups in Django admin, resulting in
I am using Google analytics and wish to differentiate between two different cases on
how do I differentiate between the two memory warning levels in didReceiveMemoryWarning ? Received
I'm trying to differentiate between two (or more) UITouch objects on the iPhone. Specifically,
How to differentiate between two items in the ListView Activity(Android)?? As i am creating
How do I differentiate between two triggers that can both POST callbacks to the
how can I differentiate between the two, when the edit field is empty in
I'm trying to use type hinting to differentiate between two single-arg methods. For example,

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.