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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T21:18:08+00:00 2026-05-29T21:18:08+00:00

I have 60 columns and unknown rows. I’m getting the datas continuously such as

  • 0

I have 60 columns and unknown rows. I’m getting the datas continuously such as Current.Cursor.Position.X and Current.Cursor.Position.Y and many of them. So there is no unknown numbers of rows. I want to save these datas nicely. I dont want to be busy with db. I’m new on this topic. I tried to save them in a text file. I was successfull, but that wasn’t in a order. I want to make it in order. What could be the perfect solution for this? If you can provide example codes, It will be perfect for me to understand better.

        System.Data.DataTable DT = new System.Data.DataTable();

        DT.Columns.Add( " 1 ");
        DT.Columns.Add("Column2");
        DT.Columns.Add("Column3");
        DT.Columns.Add("Column60");


           DT.Rows.Add(skeleton.Joints[JointID.Head].Position.X,skeleton.Joints[JointID.Head].Position.Y, skeleton.Joints[JointID.Head].Position.Z);


        foreach (DataRow row in DT.Rows)
        {

            StreamWriter fileWriter = new StreamWriter("table.csv",true);
            fileWriter.WriteLine(row[0].ToString() + row[1].ToString() + row[2].ToString());
            fileWriter.Close();

            }
  • 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-29T21:18:10+00:00Added an answer on May 29, 2026 at 9:18 pm

    This code should get you starting

    //create an instance of a table
    System.Data.DataTable DT = new System.Data.DataTable();
    //dynamically add columns
    DT.Columns.Add("Column1");
    DT.Columns.Add("Column2");
    DT.Columns.Add("Column3");
    .
    .
    .
    DT.Columns.Add("Column60");
    
    //this is how you add rows to it
    DT.Rows.Add("val1", "val2", "val3",...."val60");
    
    //this is how you retrieve it
    foreach (DataRow row in DT.Rows)
    {
       Console.Writeline(row[0].toString()); //returns the first column for each iteration
    }
    

    Hope this was helpful to you.. dont forget to vote up

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

Sidebar

Related Questions

I have a table that, some of its columns are unknown at compile time.
I have 12 columns separated by a tab. How can I join them side-by-side?
I have two columns in my table and the rows are created dynamically. <table
I have two arrays: var columns = ["Date", "Number", "Size", "Location", "Age"]; var rows
I have a site layout that uses floats to achieve the desired columns/rows. On
There are lots of posts out there on pivoting rows into columns for various
I have a csv file with unknown amount of columns and row. The only
I'm running Oracle 10g and have columns with Type_Name TIMESTAMP(6) WITH TIME ZONE When
I have 62 columns in a table under SQL 2005 and LINQ to SQL
I have three columns in my table - company_name, first_name, last_name . In the

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.