Sie erhält man, indem man entweder nur den Funktionsnamen – ohne Klammern – angibt oder als anonyme Funktion.
Nun zur Veranschaulichung ein weiteres Beispiel mit einer anonymen Funktion (Lambda-Ausdruck).
Der Schnipsel findet alle Java-Dateien, deren absoluter Dateiname länger als 60 Zeichen ist.
blog.codecentric.deThe example above uses the built in function rm.
An example with an anonymous function (lambda expression) follows;
it finds all Java files where the absolute filename consists of more than 60 characters.
blog.codecentric.deErstellen von Ausdrucksbaumstrukturen aus Lambda-Ausdrücken
Wenn ein Lambda-Ausdruck einer Variablen vom Typ Expression < TDelegate > zugewiesen wird, gibt der Compiler Code zum Erstellen einer Ausdrucksbaumstruktur aus, die den Lambda-Ausdruck darstellt.
msdn.microsoft.comCreating Expression Trees from Lambda Expressions
When a lambda expression is assigned to a variable of type Expression, the compiler emits code to build an expression tree that represents the lambda expression.
msdn.microsoft.comDas Async-Schlüsselwort ist ein vorbehaltloses Schlüsselwort.
Es ist ein Schlüsselwort, wenn eine Methode oder einen Lambda-Ausdruck ändert.
In allen anderen Kontexten wird er als Bezeichner interpretiert.
msdn.microsoft.comThe Async keyword is an unreserved keyword.
It is a keyword when it modifies a method or a lambda expression.
In all other contexts, it is interpreted as an identifier.
msdn.microsoft.comMöchtest du ein Wort, eine Phrase oder eine Übersetzung hinzufügen?
Sende uns gern einen neuen Eintrag.