Extension Methods not Recognized

前端 未结 12 1053
抹茶落季
抹茶落季 2020-12-10 00:09

What is necessary to have an extension method honored when it exists in an imported assembly? I built one in a class library project but it is not recognized in my web proj

12条回答
  •  渐次进展
    2020-12-10 01:02

    For anyone who lands here while having the same problem in VB.NET, note that not only the extension method, but the module itself needs to be marked as Public or else you'll get this error. This is the case at least with VS2015 Community and will likely be the case in other versions too.

提交回复
热议问题