Click here to Skip to main content
15,891,943 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi Team,

I have the code as follows:
C#
ICombinedMaster combinedMaster = Kaizen2GCacheManager.CircleLookupList.Where(circlelookup => circlelookup.LookupCircle.ToUpper() == fileLog.CircleInFileName.ToUpper()).FirstOrDefault();
fileLog.CircleId = combinedMaster == null ? 0 : combinedMaster.CircleId;

I cant understand this code .can anyone can please explain the above code .Please let me know

Thanks
Harshal
Posted
Updated 12-May-14 1:09am
v2

1 solution

The first line is just a WHERE clause - it selects only those elements of Kaizen2GCacheManager.CircleLookupList where the LookupCircle matches the fileLog, and returns the first match, or null if there are no matching elements.
The second checks if it is null, and returns 0 or the ID of the circle.

For any more detail, we would have to know what all your other classes are and how they work - and frankly that's your job, not mine.
 
Share this answer
 
Comments
R Harshal 12-May-14 6:24am    
Thanks for your reply.
I got it Buddy.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900