Click here to Skip to main content
15,902,634 members
Home / Discussions / C#
   

C#

 
GeneralRe: Need help on how to loop through the following code to find the nearest number above in comparison to another Pin
Keith Barrow11-Mar-10 3:15
professionalKeith Barrow11-Mar-10 3:15 
GeneralRe: Need help on how to loop through the following code to find the nearest number above in comparison to another Pin
Richard MacCutchan11-Mar-10 4:37
mveRichard MacCutchan11-Mar-10 4:37 
GeneralRe: Need help on how to loop through the following code to find the nearest number above in comparison to another Pin
suprsnipes11-Mar-10 5:13
suprsnipes11-Mar-10 5:13 
GeneralRe: Need help on how to loop through the following code to find the nearest number above in comparison to another Pin
Richard MacCutchan11-Mar-10 6:33
mveRichard MacCutchan11-Mar-10 6:33 
GeneralRe: Need help on how to loop through the following code to find the nearest number above in comparison to another Pin
DaveyM6911-Mar-10 8:26
professionalDaveyM6911-Mar-10 8:26 
QuestionWeb Service authentification server site Pin
olibara10-Mar-10 23:17
olibara10-Mar-10 23:17 
QuestionProblem with list with generic filter predicate. Pin
ddecoy10-Mar-10 22:47
ddecoy10-Mar-10 22:47 
AnswerRe: Problem with list with generic filter predicate. Pin
Keith Barrow10-Mar-10 23:31
professionalKeith Barrow10-Mar-10 23:31 
The second code is very convoluted, I don't know why you are using reflection to get the property type.


List<T> list = (from c in oq select c).ToList();
list = list.FindAll(o => o.GetType().GetProperty("PropertyName").GetValue(o,null).ToString() == company));


is cleaner, but you can do the find all operation as where clause in the select. The problem you are currently getting is either because T doesn't have a propertyname (and if it does, why are you getting it by refelection?) or the property istelf has a null value.
Dalek Dave: There are many words that some find offensive, Homosexuality, Alcoholism, Religion, Visual Basic, Manchester United, Butter.
Pete o'Hanlon: If it wasn't insulting tools, I'd say you were dumber than a bag of spanners.

GeneralRe: Problem with list with generic filter predicate. Pin
ddecoy10-Mar-10 23:52
ddecoy10-Mar-10 23:52 
GeneralSOLVED Pin
ddecoy11-Mar-10 0:03
ddecoy11-Mar-10 0:03 
QuestionFast execution Pin
sanforjackass10-Mar-10 22:31
sanforjackass10-Mar-10 22:31 
AnswerRe: Fast execution Pin
Saksida Bojan10-Mar-10 22:40
Saksida Bojan10-Mar-10 22:40 
GeneralRe: Fast execution Pin
sanforjackass10-Mar-10 22:53
sanforjackass10-Mar-10 22:53 
GeneralRe: Fast execution Pin
harold aptroot10-Mar-10 22:57
harold aptroot10-Mar-10 22:57 
GeneralRe: Fast execution Pin
sanforjackass10-Mar-10 22:59
sanforjackass10-Mar-10 22:59 
GeneralRe: Fast execution Pin
harold aptroot10-Mar-10 23:02
harold aptroot10-Mar-10 23:02 
GeneralRe: Fast execution Pin
sanforjackass10-Mar-10 23:04
sanforjackass10-Mar-10 23:04 
GeneralRe: Fast execution Pin
harold aptroot10-Mar-10 23:05
harold aptroot10-Mar-10 23:05 
GeneralRe: Fast execution Pin
Rob Philpott10-Mar-10 23:44
Rob Philpott10-Mar-10 23:44 
GeneralRe: Fast execution Pin
harold aptroot11-Mar-10 0:03
harold aptroot11-Mar-10 0:03 
GeneralRe: Fast execution [modified] Pin
Keith Barrow10-Mar-10 23:03
professionalKeith Barrow10-Mar-10 23:03 
AnswerRe: Fast execution Pin
Keith Barrow10-Mar-10 22:41
professionalKeith Barrow10-Mar-10 22:41 
GeneralRe: Fast execution Pin
StarBP11-Mar-10 14:38
StarBP11-Mar-10 14:38 
AnswerRe: Fast execution Pin
Luc Pattyn11-Mar-10 2:14
sitebuilderLuc Pattyn11-Mar-10 2:14 
QuestionData Connections Pin
AlucardCode10-Mar-10 21:05
AlucardCode10-Mar-10 21:05 

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.