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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T00:43:13+00:00 2026-06-15T00:43:13+00:00

I have a DataTable with the following structure ATM Fault ——— A01 34256 A02

  • 0

I have a DataTable with the following structure

ATM Fault
---------    
A01 34256
A02 56346
A03 98946

How can I store it in one string variable by using pipe delimiter as

string temp="A01|34256,A02|56346,A03|98946";

I was Converting My Linq To DataTable.But i it seems that i can do it in LINQ itself

var diff = dtOpenEvent.AsEnumerable().Except(dtOutputTemp.AsEnumerable(), DataRowComparer.Default);
DataTable di = diff.CopyToDataTable();//This is the Datatable which i want to Convert

How Can i achieve same by modifying only var diff statement so that there is no need to convert it in DataTable

  • 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-15T00:43:15+00:00Added an answer on June 15, 2026 at 12:43 am

    You can first concat the ATM and Fault pairs with a pipe and then join them with comma:

    IEnumerable<string> pairs = table
                .AsEnumerable()
                .Select(r => string.Format("{0}|{1}"
                     , r.Field<string>("ATM")
                     , r.Field<string>("Fault")));
    string result = string.Join(",", pairs);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this DataTable with the following structure: ID | VALUE ---------------- 1 |
I have the following structure: listView.xhtml <h:dataTable value=#{listBean.myList} ...> //for every row I create
I have a DataTable which has the following structure. StartDate (Type DateTime) EndDate (Type
I have a DataTable which is bound to datagridview (Winforms)... I use the following
I have converted my Datatable to json string use the following method... public string
I have the following code that serializes a DataTable to XML. StringWriter sw =
I have a table structure like the following: table a: id int name varchar
I have the DataTable with following columns: id, Name, Description, ParentId and would like
I have the following datatable : id name name_in 3 sys sys 5 con
I have the following DataTable dt = new DataTable(); dt.Columns.Add(col1, typeof(string)); dt.Columns.Add(col2, typeof(string)); dt.Rows.Add(1,

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.