Click here to Skip to main content
15,884,425 members
Home / Discussions / C#
   

C#

 
GeneralRe: How can i play a flash(.swf) file in a c# application? Pin
Said Ali Jalali28-Sep-09 4:41
Said Ali Jalali28-Sep-09 4:41 
QuestionUpload Pic... Pin
mjawadkhatri17-Jul-09 21:07
mjawadkhatri17-Jul-09 21:07 
AnswerRe: Upload Pic... Pin
Manas Bhardwaj17-Jul-09 22:30
professionalManas Bhardwaj17-Jul-09 22:30 
GeneralRe: Upload Pic... Pin
mjawadkhatri18-Jul-09 0:23
mjawadkhatri18-Jul-09 0:23 
GeneralRe: Upload Pic... Pin
Manas Bhardwaj18-Jul-09 8:20
professionalManas Bhardwaj18-Jul-09 8:20 
QuestionHow to add...... Pin
mjawadkhatri17-Jul-09 18:53
mjawadkhatri17-Jul-09 18:53 
AnswerRe: How to add...... Pin
K030617-Jul-09 19:15
K030617-Jul-09 19:15 
QuestionMultiple Field Sorting C# Pin
dsrao17-Jul-09 18:46
dsrao17-Jul-09 18:46 
Hi All,

I want to sort collections..


// Class

public class Item
{

public String Name{get;set;}
public int Cost{get;set;}

public Item(string name,int cost)
{
Name=name;
Cost=cost;
}
}

// Collection of Data

List<item> items=new List<item>();
items.Add(New Item("House",100));
items.Add(New Item("Car",80));
items.Add(New Item("Dog",10));
items.Add(New Item("Car",50));
items.Add(New Item("Cycle",25));
items.Add(New Item("Car",120));

Note:
Provide code to sort a collection of Item. The code should sort the Item collection only one time, following this rule: The Items should be ordered by their names (following the standard C# API for string ordering), but if two Items have the same name, then those Items should be ordered by their cost, with the lower cost item to appear before the higher cost item.

I appreciate somebody provide solution for the same.

Thanks & Regards
Rao

AnswerRe: Multiple Field Sorting C# Pin
Uri Lavi17-Jul-09 19:26
Uri Lavi17-Jul-09 19:26 
GeneralRe: Multiple Field Sorting C# Pin
dsrao18-Jul-09 9:12
dsrao18-Jul-09 9:12 
AnswerRe: Multiple Field Sorting C# Pin
riced17-Jul-09 20:49
riced17-Jul-09 20:49 
GeneralRe: Multiple Field Sorting C# Pin
Luc Pattyn17-Jul-09 23:55
sitebuilderLuc Pattyn17-Jul-09 23:55 
GeneralRe: Multiple Field Sorting C# Pin
riced18-Jul-09 0:11
riced18-Jul-09 0:11 
GeneralRe: Multiple Field Sorting C# Pin
dsrao18-Jul-09 9:13
dsrao18-Jul-09 9:13 
QuestionProcess.workingset Pin
hpydir17-Jul-09 14:53
hpydir17-Jul-09 14:53 
AnswerRe: Process.workingset Pin
Luc Pattyn17-Jul-09 15:03
sitebuilderLuc Pattyn17-Jul-09 15:03 
Questionhelp Pin
unlucky_dreamer17-Jul-09 12:45
unlucky_dreamer17-Jul-09 12:45 
AnswerRe: help Pin
DaveyM6917-Jul-09 13:20
professionalDaveyM6917-Jul-09 13:20 
GeneralRe: help Pin
Michael Schubert17-Jul-09 22:06
Michael Schubert17-Jul-09 22:06 
QuestionMS Word Automation - Combining word documents Pin
venadder17-Jul-09 11:25
venadder17-Jul-09 11:25 
QuestionDelegates - I don't Get It Pin
eddieangel17-Jul-09 7:52
eddieangel17-Jul-09 7:52 
AnswerRe: Delegates - I don't Get It Pin
harold aptroot17-Jul-09 8:14
harold aptroot17-Jul-09 8:14 
AnswerRe: Delegates - I don't Get It Pin
CodingYoshi17-Jul-09 8:20
CodingYoshi17-Jul-09 8:20 
GeneralRe: Delegates - I don't Get It Pin
eddieangel17-Jul-09 8:35
eddieangel17-Jul-09 8:35 
GeneralRe: Delegates - I don't Get It Pin
DaveyM6917-Jul-09 10:47
professionalDaveyM6917-Jul-09 10:47 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.