我卡住了,假设我有一个方法:
public void InsertEmployee(Employee _employee, out Guid _employeeId)
{
//My code
//Current execution is here.
//And here I need a list of 'out' parameters of 'InsertEmployee' Method
}
如何实现?我知道的一种方式
MethodInfo.GetCurrentMethod().GetParameters()
但是如何更具体地只针对输出参数呢?
最佳答案
MethodInfo.GetCurrentMethod().GetParameters().Where(p => p.IsOut)
关于c# - c#中如何获取当前执行方法的输出参数列表?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21506403/