Click here to Skip to main content
15,887,746 members
Home / Discussions / C#
   

C#

 
GeneralRe: Implementing a LogHelper class - is this approach right Pin
Bartosz Jarmuż19-Aug-15 7:53
Bartosz Jarmuż19-Aug-15 7:53 
GeneralRe: Implementing a LogHelper class - is this approach right Pin
Pete O'Hanlon19-Aug-15 8:02
mvePete O'Hanlon19-Aug-15 8:02 
GeneralRe: Implementing a LogHelper class - is this approach right Pin
Bartosz Jarmuż19-Aug-15 8:55
Bartosz Jarmuż19-Aug-15 8:55 
GeneralRe: Implementing a LogHelper class - is this approach right Pin
Eddy Vluggen19-Aug-15 8:44
professionalEddy Vluggen19-Aug-15 8:44 
GeneralRe: Implementing a LogHelper class - is this approach right Pin
Bartosz Jarmuż19-Aug-15 9:15
Bartosz Jarmuż19-Aug-15 9:15 
GeneralRe: Implementing a LogHelper class - is this approach right Pin
Eddy Vluggen19-Aug-15 11:25
professionalEddy Vluggen19-Aug-15 11:25 
AnswerRe: Implementing a LogHelper class - is this approach right Pin
V.19-Aug-15 10:43
professionalV.19-Aug-15 10:43 
GeneralWhat's more efficient in .Any and .Count in C# (Extension methods) Pin
rosharavinda19-Aug-15 5:01
rosharavinda19-Aug-15 5:01 
C#
public void MethodName(ObservableCollection<DataCollection> dataCollection)
    {
        if (dataCollection != null)
        {
            IsChecked = dataCollection.Any(o => o.DataCollectionID.Equals(30));

            IsChecked = dataCollection.Where(o => o.DataCollectionID.Equals(30)).Count() > 0;
        }
    }

CSS
Can anyone explain me, what could be the most efficient way to use from above two filtering? .Any? or .Where.Count?

Note: Consider that dataCollection has over 10,000 items.

Please advice me. Thank you

GeneralRe: What's more efficient in .Any and .Count in C# (Extension methods) Pin
Pete O'Hanlon19-Aug-15 5:25
mvePete O'Hanlon19-Aug-15 5:25 
GeneralRe: What's more efficient in .Any and .Count in C# (Extension methods) Pin
OriginalGriff19-Aug-15 5:32
mveOriginalGriff19-Aug-15 5:32 
GeneralRe: What's more efficient in .Any and .Count in C# (Extension methods) Pin
Nitzan Levi19-Aug-15 9:47
Nitzan Levi19-Aug-15 9:47 
QuestionPerformance of FileStream, scale is stalking me Pin
Rob Philpott19-Aug-15 3:36
Rob Philpott19-Aug-15 3:36 
AnswerRe: Performance of FileStream, scale is stalking me Pin
Eddy Vluggen19-Aug-15 4:49
professionalEddy Vluggen19-Aug-15 4:49 
GeneralRe: Performance of FileStream, scale is stalking me Pin
Rob Philpott19-Aug-15 4:52
Rob Philpott19-Aug-15 4:52 
GeneralRe: Performance of FileStream, scale is stalking me Pin
Eddy Vluggen19-Aug-15 4:54
professionalEddy Vluggen19-Aug-15 4:54 
GeneralRe: Performance of FileStream, scale is stalking me Pin
Rob Philpott19-Aug-15 5:09
Rob Philpott19-Aug-15 5:09 
GeneralRe: Performance of FileStream, scale is stalking me Pin
Eddy Vluggen19-Aug-15 7:09
professionalEddy Vluggen19-Aug-15 7:09 
GeneralRe: Performance of FileStream, scale is stalking me Pin
Rob Philpott19-Aug-15 7:18
Rob Philpott19-Aug-15 7:18 
GeneralRe: Performance of FileStream, scale is stalking me Pin
Eddy Vluggen19-Aug-15 8:11
professionalEddy Vluggen19-Aug-15 8:11 
AnswerRe: Performance of FileStream, scale is stalking me Pin
Afzaal Ahmad Zeeshan19-Aug-15 5:41
professionalAfzaal Ahmad Zeeshan19-Aug-15 5:41 
GeneralRe: Performance of FileStream, scale is stalking me Pin
Rob Philpott19-Aug-15 5:52
Rob Philpott19-Aug-15 5:52 
GeneralRe: Performance of FileStream, scale is stalking me Pin
Afzaal Ahmad Zeeshan19-Aug-15 5:58
professionalAfzaal Ahmad Zeeshan19-Aug-15 5:58 
GeneralRe: Performance of FileStream, scale is stalking me Pin
Rob Philpott19-Aug-15 6:10
Rob Philpott19-Aug-15 6:10 
GeneralRe: Performance of FileStream, scale is stalking me Pin
Pete O'Hanlon19-Aug-15 6:18
mvePete O'Hanlon19-Aug-15 6:18 
QuestionMSBuild The type or namespace name 'Class1' could not be found (are you missing a using directive or an assembly reference?) error Pin
Txalaparta18-Aug-15 23:18
professionalTxalaparta18-Aug-15 23:18 

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.