Skip to content

Support delegation #102

@syyqdsxfdmy

Description

@syyqdsxfdmy

I have a custom method to receive the delegation type. The method code is as follows:
public static dynamic GREPARRAY(dynamic data, Func<dynamic, bool> func)
{
if (func==null)
{
func = item => item > 1;
}
List list = new List();
if (data is Array)
{
foreach (dynamic item in data)
{
if (func(item))
{
list.Add(item);
}
}
}
return list;
}

I try to use statements:“GREPARRAY(null,item=>item>1)”,An error occurred。
How do I call this method,thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions