Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the Binder class in System.Reflection for?

Tags:

c#

.net

I notice that there is a Binder class resided in the System.Reflection namespace of .NET. I read through the documentation on MSDN, but I am still not very what it does and how I can use it.

I did a search on Google but the word binding is alluded to "Data binding". By binding, does it mean "Data Binding"? If so, how can I use it for data binding then? I am hoping to find a simple or easy-to-understand example on its usage.

Thanks!

like image 307
Carven Avatar asked Oct 15 '25 14:10

Carven


1 Answers

Binder selects a member from a list of candidates, and performs type conversion from actual argument type to formal argument type (MSDN).

You are also able to create your own binder.

Also quoted from this 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.

like image 157
Karel Frajták Avatar answered Oct 18 '25 04:10

Karel Frajták