Search Results

Search found 3 results on 1 pages for 'refelection'.

Page 1/1 | 1 

  • lambda expression based reflection vs normal reflection

    - by bitbonk
    What is the difference between normal reflection and the reflection that can be done with lambda expressions such as this (taken form build your own MVVM): public void NotifyOfPropertyChange<TProperty>(Expression<Func<TProperty>> property) { var lambda = (LambdaExpression)property; MemberExpression memberExpression; if (lambda.Body is UnaryExpression) { var unaryExpression = (UnaryExpression)lambda.Body; memberExpression = (MemberExpression)unaryExpression.Operand; } else memberExpression = (MemberExpression)lambda.Body; NotifyOfPropertyChange(memberExpression.Member.Name); } Is the lambda based reflection just using the normal reflection APIs internally? Or is this something significantly different. What is ther perfomance difference?

    Read the article

  • How to see if an object is an array?

    - by edbras
    How can I see in Java if an Object is an array without using reflection? And how can I iterate through all items without using reflection? I use Google GWT so I am not allowed to use reflection :( I would love to implement the following methods without using refelection: private boolean isArray(final Object obj) { ??.. } private String toString(final Object arrayObject) { ??.. } BTW: neither do I want to use Javascript such that I can use it in non-GWT environments Ed

    Read the article

  • Fastest way to call a COM objects method without using a RCW

    - by Nathan W
    I'm trying to find the cleanest and fastest way for calling a COM objects methods. I was using a RCW for the object but every time a new version of the third party COM object comes out its GUID changes which then renders the RCW useless, so I had to change and start using Type mytype = Type.GetTypeFromProgID("MyCOMApp.Application"); so that every time a new version of the COM object comes out I don't have to recomplie and redeploy my app. At the moment I am using refelection like mytype.InvokeMemeber but I feel it is so slow compared to just calling the RCW. How does everyone else tackle the problem of changing 3rd party COM object versions, but still maintaining the speed of a RCW?

    Read the article

1