如何让 VS2010 使用公共构造函数而不是内部构造函数生成 Resources.Designer.cs? [英] How do I get VS2010 to generate Resources.Designer.cs with a public constructor instead of internal?

查看:25
本文介绍了如何让 VS2010 使用公共构造函数而不是内部构造函数生成 Resources.Designer.cs?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

每次我在 resources.resx 中编辑资源时,Visual Studio 都会使用 内部 构造函数重新生成 Resources.Designer.cs.

Each time I edit a resource in resources.resx, Visual Studio regenerates Resources.Designer.cs with an internal constructor.

我需要这个构造函数public.有没有办法调整这个?

I need this constructor to be public. Is there a way to adjust this?

推荐答案

请按照以下步骤操作:打开项目属性(即您想要公开的资源).选择资源选项卡.在 Top 旁边,您应该能够看到 Access Modifier DropDownList,您可以在那里选择 Internal 或 Public.就是这样:)

Follow these steps: Open the project properties (i.e. the one for which Resources you want to be public). Select the Resources tab. Next to the Top you should be able to see the Access Modifier DropDownList and there you can choose the Internal or the Public. That is it :)

这篇关于如何让 VS2010 使用公共构造函数而不是内部构造函数生成 Resources.Designer.cs?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆