Extension Methods not Recognized

前端 未结 12 1054
抹茶落季
抹茶落季 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:04

    If the Extension method is callable when not using the Extension syntax, use the Format:

    this.MyExtensionMethod()
    

    That cleared up my problem of not finding the Extension method of a class in VS2010.

提交回复
热议问题