LINQ to Swap few Columns to Rows of a DataTable using C#
Frage
I've datatable:
location Quarter ppl_required ppl_available
BLR Q1 70 35
BLR Q2 50 45
BLR Q3 25 28
BLR Q4 60 58
CHN Q1 77 92
CHN Q2 42 66
CHN Q3 29 20
CHN Q4 22 24
Is there a better way to get the below DataTable as output in very simple or short way [without loops] using LINQ
or with advanced features of LINQ
either with .NET3.5/4.0/4.5 framework.
Location ppl_Required_Q1 ppl_Required_Q2 ppl_Required_Q3 ppl_Required_Q4 ppl_available_Q1 ppl_available_Q2 ppl_available_Q3 ppl_available_Q4
BLR 70 50 25 60 35 45 28 58
CHN 77 42 29 22 92 66 20 24
Keine korrekte Lösung
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow