Error when using extension methods in C#

后端 未结 16 2770
夕颜
夕颜 2020-12-13 01:31

I came across an issue that makes me think there is bug in the 3.0 framework. When I try to use extension methods I get the following error:

Missing compile         


        
16条回答
  •  青春惊慌失措
    2020-12-13 02:19

    in VS, click Project (next to File,Edit,View), select Properties

    then in Application tab (you'll notice you're already in 3.5), select the Target Framework to 2.0, then compile (it will error). then put it back again to 3.5, then compile again, the error will disappear

    i think it is just a small glitch in Visual Studio, just fool the IDE :-)

提交回复
热议问题