Omgili - forum search, search forums  
  

Discussions about func func

Displaying 1 - 10 out of 12,356 discussions.  
RSS Feed Options
Time Frame: (Any time)   Minimum number of replies: (2)   Minimum number of discussing users: (0)
  |  

Page: 1   2   3   4   5   6   7   8   9   10  
Keep this page open to be updated with the newest discussions automatically.
I understand lambdas and the Func and Action delegates. But expressions stump me. In what circumstances would you use an Expression<Func<T>> rather than a plain old Func<T> ?
Started by on , 4 posts by 4 people.  
For example, LINQ to SQL gets the expression and converts it to the equivalent SQL statement and submits it to server (rather than executing ... .
When you want to treat lambda expressions as expression trees and look inside them instead of executing them .
This seems inconsistent. Why do we use &Example::func instead of Example::func? is there a use for Example::func or &exampleFunction? it doesnt seem like we can make a reference to a function so that rules out Example::func. and i cant think of a way ...
Started by on , 3 posts by 3 people.  
For a very rough example, suppose you have a class having several member variables by which you may need to sort of the elements of an array of that class type, like this: struct CL { int x, y, z; }; bool sort_by... .
The point is using Function Pointers.
Hi there, I've spent hours with this but haven't managed... Please see example below - How can this be done? The idea is to build a compiled expression of type Func<dynamic, dynamic> given an Expression<Func<T1,T2>> passed by the class...
Started by on , 4 posts by 4 people.  
Dynamic, dynamic> at this point given lambdaExpression? var func = lambdaExpression.Compile(); _compiledExpression = (dynamic x) => (dynamic)func((T1)x); } } I was looking in to something similar.
Ask your Facebook Friends
Is there a faster way to cast Fun<TEntity, TId> to Func<TEntity, object> public static class StaticAccessors<TEntity> { public static Func<TEntity, TId> TypedGetPropertyFn<TId>(PropertyInfo pi) { var mi = pi.GetGetMethod(...
Started by on , 4 posts by 4 people.  
Notice that TResult is marked with "out" so its return value can be cast as a less-specific .
.NET 3.5 for Func .
In .NET 4.0 you can do this because the Func delegate marks TResult with the out modifier.
Going from a lambda to an Expression is easy using a method call... public void GimmeExpression(Expression<Func<T>> expression) { ((MemberExpression)expression.Body).Member.Name; // "DoStuff" } public void SomewhereElse() { GimmeExpression...
Started by on , 6 posts by 6 people.  
If there's any way you could do so (due to optimizations and other things done by the compiler, some data might be thrown away, so it might be impossible to ... .
Func<T> represents a generic delegate and not an expression.
Ooh, it's not easy at all.
I have a method that currently takes a Func<Product, string> as a parameter, but I need it to be an Expression<Func<Product, string>> . Using AdventureWorks, here's an example of what I'd like to do using the Func. private static void...
Started by on , 3 posts by 3 people.  
I would suggest building out the rest of your expression and then decompiling to see the generated ... .
You'll need to build your GroupBy expression by hand, which means you can't use anonymous type .
On second thought, compiling the expression won't work.
I have used C# expressions before based on lamdas, but I have no experience composing them by hand. Given an Expression<Func<SomeType, bool>> originalPredicate , I want to create an Expression<Func<OtherType, bool>> translatedPredicate...
Started by on , 3 posts by 3 people.  
); // test with LINQ-to-Objects for simplicity var func = lambda.Compile(); bool withOdd = func(new Bar { Value = 7 }), withEven = func(new Bar { Value = 12 }); } } Note however that this will be supported.
I ran across an interesting issue today. We have an application that utilizes Zend Frameworks caching functionality. A request to this application typically calls a factory method using the following line $result = call_user_func_array(array("myclass"...
Started by on , 4 posts by 4 people.  
$dummy = new MyClassName; call_user_func_array(array('MyClassName', 'method.
Which version of php are you using? There was an issue in combining call_user_func_array solves it for you.
My problem: I have a wealth of atom RSS feed files which have many different atom entries in them and a few overlapping entries between files. I need to find and return an entry based on a URL from any one of the RSS feeds. Technologies: This code is ...
Started by on , 3 posts by 3 people.  
The first element: <func:function name="cozi:findPost"> <xsl:param name="post-url"/> <-of select="$feed-entry"/> </xsl:if> </xsl:for-each> </xsl:variable> <func:result select="$feedList[1]"/> <....
When a C function does not accept any arguments, does it have to be declared/defined with a "void" parameter by the language rules? PC-Lint seems to have problems when there's nothing at all in the argument-list, and I was wondering if it's something ...
Started by on , 3 posts by 3 people.  
According to Wikipedia here, the declaration func() does basically declare the function.
IIRC func(void) in C will declare a function that takes no parameters whereas func() declares-ANSI C.
Page: 1   2   3   4   5   6   7   8   9   10  
Related Searches
func_conveyor    php make button do func    call_user_func tep_reset_cache_data_seo_urls [function call-user-func] First argument is expected   
More Information


Forum Search About Omgili Help Plugins Forum/Board Owners Privacy

i
In Title
In Topic
In Reply
Exclude
Boost