Skip to content Skip to sidebar Skip to footer

ILSpy (a.k.a. .NET Reflector) Shows A Method As Just Calling Itself, Why?

When passing anonymous types to an HtmlHelper method like TextBox, you'll get binding errors (because anonymous type members have internal access only), unless you use a RouteDataD

Solution 1:

The method AnonymousObjectToHtmlAttributes from System.Web.MVC.HtmlHelper is calling a method with the same name but from System.Web.WebPages.Html.HtmlHelper.

The ILSpy is not explicitly about that. I needed to hover the class to show from where it was coming:

enter image description here

I asked a similar question that was anwered here.


Post a Comment for "ILSpy (a.k.a. .NET Reflector) Shows A Method As Just Calling Itself, Why?"