How do i convert rows into columns using LINQ
Hi how do i translate all rows into columns ,considering first column will generate as columns name using LINQ. let me if you need more clarification.
i have a list contains below data
Product Y1 Y2 Y3 Y4 Y5 Y6 Y7 Y8 Y9 Y10
Product1 1 2 3 4 5 6 7 8 9 10
Product1 2 3 4 5 6 7 8 9 10 11
Product2 2 3 4 5 6 7 8 9 10 11
Product3 3 4 5 6 7 8 9 10 11 12
Product4 4 5 6 7 8 9 10 11 12 13
i need to get below output as a list
YKey Year Product1 Product2 Product3
Y1 2016 3 2 3 4
Y2 2017 5 3 4 5
Y3 2018 7 4 5 6
Y4 2019 9 5 6 7
Y5 2020 11 6 7 8
Y6 2021 13 7 8 9
Y7 2022 15 8 9 10
Y8 2023 17 9 10 11
Y9 2024 19 10 11 12
Y10 2025 21 11 12 3
i have just given 4 products as a example but i may have many rows.
i need it urgent
Thanks