-4

How can i provide return value according by followed sample? I want to use this function like this MyMethod(model=> model.Id)

public T MyMethod(Func<T> item)
{
    return ??
}
Bombula
  • 15
  • 1
  • 7

1 Answers1

2
public TS MyMethod<T,TS>(T item,Func<T,TS> selector)
{
    return selector(item);
}
Ivan
  • 138
  • 6