the type or namespace name ‘xxx‘ could not be found(vs for Mac)解决方法

2023-11-19

在visual studio for Mac中遇到 " the type or namespace name 'xxx' could not be found (are you missing a using derective or an assenbly reference?)" 情况的时候怎么解决

就拿List来说

打出List的时候,List也没有变蓝,还是黑色字体,并提示List不存在,(差点以为微软把List功

能砍了),我跟着老师的步骤(vs2017)走,并没有漏下任何操作,结果一看错误提示

原来是要增加一个 using System.Collection.Generic; 

在vs for Mac上新建解决方案的时候,默认只有一个using System

在百度这个问题的时候,遇到最多的解决方法是修改框架?总之没有用,在查List用法的时候眼睛和脑子同时忽略了 using System.Collection.Generic; 实在是憨憨了

身为一个刚学编程的菜鸟,完全不知道使用List要加using System.Collection.Generic;呀 

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

the type or namespace name ‘xxx‘ could not be found(vs for Mac)解决方法 的相关文章