TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Vasanthkumar Porcheziyan
NA
35
9.4k
How to group multiple array of object in c#
Oct 17 2017 6:12 AM
Hi,
I am trying to group an array of objects and sum the result of each grouped value.
object[] products =
{ new object[] {"Soap", "1" ,10},
new object[] { "Soap", "2", 20 },
new object[] { "Soap1", "1",12 },
new object[] { "Soap", "3",30 },
new object[] { "Soap2", "2" ,10},
new object[] { "Soap1", "2" ,40} };
I need the output to be like
Soap 1 10
Soap 2 20
Soap 3 30
-------------------
Total 50
-------------------
Soap1 1 12
Soap1 2 40
-------------------
Total 52
--------------------
Soap2 2 10
------------------
Total 10
--------------------
Reply
Answers (
2
)
How to use Ancestors with Descendants in LINQ to XML?
textile program paper