Click here to Skip to main content
15,894,896 members
Home / Discussions / C#
   

C#

 
AnswerAll of this post is plagiarised (except for the smiley...) Pin
Keith Barrow15-Jan-11 11:24
professionalKeith Barrow15-Jan-11 11:24 
AnswerRe: Do people know about LINQ expression trees for super fast reflection? Pin
PIEBALDconsult15-Jan-11 14:10
mvePIEBALDconsult15-Jan-11 14:10 
GeneralRe: Do people know about LINQ expression trees for super fast reflection? [modified] Pin
SledgeHammer0115-Jan-11 15:16
SledgeHammer0115-Jan-11 15:16 
GeneralRe: Do people know about LINQ expression trees for super fast reflection? Pin
SledgeHammer0115-Jan-11 15:22
SledgeHammer0115-Jan-11 15:22 
GeneralRe: Do people know about LINQ expression trees for super fast reflection? Pin
PIEBALDconsult16-Jan-11 5:11
mvePIEBALDconsult16-Jan-11 5:11 
AnswerRe: Do people know about LINQ expression trees for super fast reflection? Pin
Dan Mos16-Jan-11 3:00
Dan Mos16-Jan-11 3:00 
AnswerRe: Do people know about LINQ expression trees for super fast reflection? Pin
N a v a n e e t h16-Jan-11 5:14
N a v a n e e t h16-Jan-11 5:14 
GeneralRe: Do people know about LINQ expression trees for super fast reflection? Pin
SledgeHammer0116-Jan-11 7:14
SledgeHammer0116-Jan-11 7:14 
I was using propertyInfo.GetValue() for the 2.1 seconds. Yeah, that uses Invoke() internally Smile | :) .

I looked up Delegate.CreateDelegate(), don't you eventually need to cast it to a callable delegate to do your suggestion? Like say 'object MyGetter(object o)'?

Not sure if I will run into the same problem as I ran into with the expression trees, but originally, I specified an expression tree like:

object lambaFunc(object o)
{
return ((TheType)o).TheProperty;
}

and that worked fine on strings, but threw an exception if "TheProperty" was an int. I had to explicitly do:

object lambaFunc(object o)
{
return (object)((TheType)o).TheProperty;
}

Not sure if the delegate method would have the same issue.
AnswerRe: Do people know about LINQ expression trees for super fast reflection? Pin
jschell17-Jan-11 8:22
jschell17-Jan-11 8:22 
GeneralRe: Do people know about LINQ expression trees for super fast reflection? [modified] Pin
SledgeHammer0118-Jan-11 4:55
SledgeHammer0118-Jan-11 4:55 
Questionhow to convert php code into c sharp code Pin
gsmfather15-Jan-11 8:08
gsmfather15-Jan-11 8:08 
AnswerRe: how to convert php code into c sharp code Pin
dan!sh 15-Jan-11 8:26
professional dan!sh 15-Jan-11 8:26 
AnswerRe: how to convert php code into c sharp code Pin
fjdiewornncalwe15-Jan-11 9:28
professionalfjdiewornncalwe15-Jan-11 9:28 
QuestionC# versus C++, null references and protecting against them Pin
bob1697214-Jan-11 8:48
bob1697214-Jan-11 8:48 
AnswerRe: C# versus C++, null references and protecting against them Pin
Pete O'Hanlon14-Jan-11 9:14
mvePete O'Hanlon14-Jan-11 9:14 
GeneralRe: C# versus C++, null references and protecting against them Pin
bob1697214-Jan-11 9:58
bob1697214-Jan-11 9:58 
GeneralRe: C# versus C++, null references and protecting against them Pin
Pete O'Hanlon14-Jan-11 10:55
mvePete O'Hanlon14-Jan-11 10:55 
GeneralRe: C# versus C++, null references and protecting against them Pin
bob1697214-Jan-11 10:48
bob1697214-Jan-11 10:48 
AnswerRe: C# versus C++, null references and protecting against them Pin
jschell14-Jan-11 9:46
jschell14-Jan-11 9:46 
GeneralRe: C# versus C++, null references and protecting against them Pin
bob1697214-Jan-11 10:23
bob1697214-Jan-11 10:23 
GeneralRe: C# versus C++, null references and protecting against them Pin
jschell15-Jan-11 9:44
jschell15-Jan-11 9:44 
AnswerRe: C# versus C++, null references and protecting against them Pin
Paul Michalik15-Jan-11 2:23
Paul Michalik15-Jan-11 2:23 
AnswerRe: C# versus C++, null references and protecting against them Pin
PIEBALDconsult15-Jan-11 4:12
mvePIEBALDconsult15-Jan-11 4:12 
GeneralRe: C# versus C++, null references and protecting against them Pin
bob1697215-Jan-11 5:00
bob1697215-Jan-11 5:00 
AnswerRe: C# versus C++, null references and protecting against them Pin
Chuck O'Toole15-Jan-11 17:14
Chuck O'Toole15-Jan-11 17:14 

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.