【问题标题】:Anonymous Delegate Naming Convention匿名代表命名约定
【发布时间】:2012-06-21 07:47:06
【问题描述】:

如果我要创建一个匿名委托,例如:

  var x = new Func(x => x != null)

结果是什么:

  x.Method.FullName

它遵循什么样的命名约定?

【问题讨论】:

  • 你的意思是var x = new Func<object,bool>(o => o != null);x.Method.Name吗?
  • 是.......................
  • 你自己试试吧?

标签: c# .net reflection delegates


【解决方案1】:

据我所知,命名约定类似于 'method'__b'num' 其中“method”是声明匿名方法的方法,“num”是数字标识符。

查看http://www.codeproject.com/Articles/149929/Under-the-hood-of-anonymous-methods-in-C

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2023-03-03
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多