Expense Manager
Note : Use the collections (whi)
Menu
1. Add Income
2. Add Expense
3. Account Summary
Add Income
Take following As Input
1. Predefined Category Selection :
2. Title
3. Amount
4. Date
Add Expense
Take following As Input
1. Predefined Category Selection
2. Title
3. Amount
4. Date
Account Summary
show output : Category | Title | Amount | Date
1. Expense
1. Sort by date
2. Sort by name
3. Group by category
2. Income
1. Sort by date
2. Sort by name
3. Group by category
3. Total
show output
Total Income :
Total Expense :
I want help in above red Marked part of the assignment. that is sorting part, I used arrary, so I have to sort array, I found help for sort the list of DateTime, but Can I convert array to List and sort, please help me regarding Sorting part, attached the Source Code, Hope by that code will get proper exact reply.

VulpesPosted Jul 14, 2014, 10:47 AM
As you're only reading in a 2 x 2 array (rather than 5 x 4) for testing purposes, I've included a where clause in the sorting routine to ensure that only non-null elements are sorted. You'll get an exception otherwise.
The program still needs some work to make it robust - there's no 'quit' option for example.
Also, I'd avoid using goto (which is not considered 'nice' in C# programming circles) when there are other ways to easily achieve the same thing (while or do loops).
Aditya PatilPosted Jul 14, 2014, 12:24 PM
Now I understood complete what have to exactly for sorting and all. :)
Aditya PatilPosted Jul 14, 2014, 8:22 AM
What to print, Problem is in Printing, can you give me code for my problem from starting of sort to print it, it will be beneficial, as its urgent i have to complete it today itself, as soon as I can complete the part of Sorting under Expense I will learn and at same way complete the Sorting under Income part, So telling you all, please give me code for the Red Marked content, and also specify the code what to print, main problem is under Print.
VulpesPosted Jul 14, 2014, 7:38 AM
Aditya PatilPosted Jul 14, 2014, 6:44 AM
And when I write Console.WriteLine();
It displays Program.DateTime[] on Console. Not display the dates, and other related columns.
VulpesPosted Jul 14, 2014, 6:32 AM
DateTime[] idateSorted = idate.Cast
or, if you want the results in a List instead:
List
Aditya PatilPosted Jul 14, 2014, 1:35 AM
Ramesh MaruthiPosted Jul 14, 2014, 1:12 AM
Aditya PatilPosted Jul 14, 2014, 1:05 AM
Ramesh MaruthiPosted Jul 14, 2014, 12:58 AM
Did u tried with the linq ?
Once look at this links
http://www.informit.com/guides/content.aspx?g=dotnet&seqNum=777
http://social.msdn.microsoft.com/Forums/vstudio/en-US/a8e9ee18-07aa-4f62-9dd1-e2341cd94b85/linq-multi-dimesnional-array?forum=csharpgeneral
http://stackoverflow.com/questions/18896150/c-sharp-linq-return-a-multidimensional-array-from-linq
Converting array to list
http://stackoverflow.com/questions/5132397/fast-way-to-convert-a-two-dimensional-array-to-a-list-one-dimensional
http://bytes.com/topic/c-sharp/answers/882073-list-lists-multidimension-array
Aditya PatilPosted Jul 14, 2014, 12:47 AM
Can you give me part of sorting of Income / Expense part so I can complete remaining part.
Aditya PatilPosted Jul 14, 2014, 12:39 AM
Guest UserPosted Jul 14, 2014, 12:37 AM