Click here to Skip to main content
15,891,567 members
Home / Discussions / C#
   

C#

 
GeneralRe: Porting VS 2005 => 2010: "Could not load file or assembly..." Pin
Alan Balkany9-Dec-11 7:12
Alan Balkany9-Dec-11 7:12 
AnswerLink to solution Pin
Alan Balkany12-Dec-11 5:25
Alan Balkany12-Dec-11 5:25 
Questioncontrol "asp:listview" bind to web service without database with "if statement" c# Pin
aspkiddy8-Dec-11 10:26
aspkiddy8-Dec-11 10:26 
Questionproblem with list predicate (?) or list item not being found Pin
CCodeNewbie8-Dec-11 9:33
CCodeNewbie8-Dec-11 9:33 
AnswerRe: problem with list predicate (?) or list item not being found Pin
emardini8-Dec-11 15:00
emardini8-Dec-11 15:00 
GeneralRe: problem with list predicate (?) or list item not being found Pin
CCodeNewbie8-Dec-11 21:38
CCodeNewbie8-Dec-11 21:38 
QuestionC# dataset error Pin
classy_dog8-Dec-11 9:05
classy_dog8-Dec-11 9:05 
QuestionLinq - Remove Object From Collection Pin
Kevin Marois8-Dec-11 7:19
professionalKevin Marois8-Dec-11 7:19 
I have a list of these models:

public class NodeModel : ViewModelBase
{
    public Guid Id { get; set; }
    public string Caption { get; set; }
    public string Description { get; set; }
    public bool IsActive { get; set; }
    public int Sequence { get; set; }
    public ImageSource Image { get; set; }
    public bool IsExpanded { get; set; }
    public string FileName { get; set; }
    public NodeType Type { get; set; }
    public List<NodeModel> Children { get; set; }

    public NodeModel()
    {
        Children = new List<NodeModel>();
        FileName = string.Empty;
    }
}


The list is contained in a collection called Folders. I want to remove an object from the collection, so I'm using:

Folders.Remove(f => f.Id == model.Id); 


But it's not removing it, What's wrong here?
Everything makes sense in someone's mind

AnswerRe: Linq - Remove Object From Collection Pin
fjdiewornncalwe8-Dec-11 7:37
professionalfjdiewornncalwe8-Dec-11 7:37 
AnswerRe: Linq - Remove Object From Collection Pin
Dan Mos8-Dec-11 7:46
Dan Mos8-Dec-11 7:46 
GeneralRe: Linq - Remove Object From Collection Pin
Kevin Marois8-Dec-11 7:49
professionalKevin Marois8-Dec-11 7:49 
GeneralRe: Linq - Remove Object From Collection Pin
Dan Mos8-Dec-11 7:56
Dan Mos8-Dec-11 7:56 
GeneralRe: Linq - Remove Object From Collection Pin
Kevin Marois8-Dec-11 7:57
professionalKevin Marois8-Dec-11 7:57 
GeneralRe: Linq - Remove Object From Collection Pin
Dan Mos8-Dec-11 8:22
Dan Mos8-Dec-11 8:22 
GeneralRe: Linq - Remove Object From Collection Pin
Kevin Marois8-Dec-11 8:24
professionalKevin Marois8-Dec-11 8:24 
GeneralRe: Linq - Remove Object From Collection Pin
Dan Mos8-Dec-11 9:18
Dan Mos8-Dec-11 9:18 
GeneralRe: Linq - Remove Object From Collection Pin
BobJanova8-Dec-11 22:44
BobJanova8-Dec-11 22:44 
Generaltwo compile time errors with your for loop based code: Re: Linq - Remove Object From Collection Pin
BillWoodruff9-Dec-11 9:16
professionalBillWoodruff9-Dec-11 9:16 
GeneralRe: Linq - Remove Object From Collection Pin
BillWoodruff9-Dec-11 9:17
professionalBillWoodruff9-Dec-11 9:17 
AnswerRe: Linq - Remove Object From Collection Pin
Mirko198012-Dec-11 2:53
Mirko198012-Dec-11 2:53 
AnswerRe: Linq - Remove Object From Collection Pin
BillWoodruff9-Dec-11 1:04
professionalBillWoodruff9-Dec-11 1:04 
QuestionType Isomorphisms: this is more an open theory question than a practical programming question Pin
Alaric_8-Dec-11 6:01
professionalAlaric_8-Dec-11 6:01 
AnswerRe: Type Isomorphisms: this is more an open theory question than a practical programming question Pin
Alaric_8-Dec-11 8:09
professionalAlaric_8-Dec-11 8:09 
QuestionCompress and decompress string between java and c# Pin
Hossein Khalaj8-Dec-11 6:00
Hossein Khalaj8-Dec-11 6:00 
AnswerRe: Compress and decompress string between java and c# Pin
Luc Pattyn8-Dec-11 7:25
sitebuilderLuc Pattyn8-Dec-11 7:25 

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.