c# - System.Reflection 中的 Binder 类是做什么用的?

标签 c# .net

我注意到在 .NET 的 System.Reflection 命名空间中有一个 Binder 类。我通读了 MSDN 上的文档,但我仍然不太了解它的功能以及如何使用它。

我在 Google 上进行了搜索,但绑定(bind)一词暗示为“数据绑定(bind)”。通过绑定(bind),是否意味着“数据绑定(bind)”?如果是这样,那我该如何使用它进行数据绑定(bind)呢?我希望能找到一个简单易懂的例子来说明它的用法。

谢谢!

最佳答案

Binder 从候选列表中选择一个成员,并执行从实际参数类型到形式参数类型 ( MSDN) 的类型转换。

您还可以创建自己的 Binder 。

也引自此page

A System.Reflection.Binder object, which controls such things as type coercion and appropriate overloaded method selection. In most cases you’ll be able to pass null and use the default binder.

关于c# - System.Reflection 中的 Binder 类是做什么用的?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13063572/

相关文章:

c# - SQL 服务器 : Rethrow exception with the original exception number

c# - P/Pnvoke SetFocus 到一个特定的控件

c# - 给定 IP 地址和子网掩码,如何计算 CIDR?

c# - 在 ASP.NET 中创建社区的框架

c# - 检测何时创建新的托管线程

c# - 读取行并保留 xml 文件中的空格

c# - 异步等待和线程

c# - 扩展内置类型的自定义格式功能

c# - 运行时本地化

.net - 我可以创建非基于语言的全局 .resx 吗?