Click here to Skip to main content
11,924,995 members (47,046 online)
Rate this:
Please Sign up or sign in to vote.
See more: C#

Can anyone tell me how to convert array to datatable

A   145
B   234
C   778
A   908
B   4567
C   098

so on

I want to convert above like
A      B      C
145   234   778
908   4567   098

Thanks in advance.
Posted 20-Apr-11 1:07am
Edited 20-Apr-11 1:35am
CodingLover 20-Apr-11 6:15am
is that array contain a dynamic letter combination or just A,B,C ?
dooa 20-Apr-11 6:17am
yes array contain dynamic letter...
Pong D. Panda 20-Apr-11 6:34am
Can you post your code on how you initialize your array? is that multi dimensional?
BobJanova 20-Apr-11 7:41am
You are doing two things here:
- converting the data from 'long' to 'wide' format, and
- putting the data in a data table

Which part do you need help with? What have you tried so far?
SAKryukov 20-Apr-11 18:05pm
One single word "convert" along deserves a low vote for the question...

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

Simple question, simple answer[^].
Manfred R. Bihy 20-Apr-11 8:05am
Since it truely is a simple matter, have my 5!
Richard MacCutchan 20-Apr-11 8:17am
SAKryukov 20-Apr-11 18:07pm
Not just simple; bad question. 5 for your answer, the only sensible reply I would think of.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web01 | 2.8.151125.3 | Last Updated 20 Apr 2011
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100