我的设置不起作用 [英] My.settings is not working

查看:75
本文介绍了我的设置不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用visual studio 2017

i点击属性并添加了3个字符串值,问题是当我点击一个按钮进行编码My.settings时我的字母没有被突出显示它不能定义了什么问题?



我尝试了什么:



i没有尝试任何东西我等待答案。

im using visual studio 2017
i clicked on properties and added 3 string values, the problem is when i click a button for coding My.settings the "My" letter is not being highlighted it cant be defined what is the problem ?

What I have tried:

i didnt try anything im waiting for answers.

推荐答案

我的关键字是一个VB.NET功能,不能在C#中使用。

C#中最接近的功能是添加一个设置文件;默认情况下,此文件位于属性命名空间中,您可以添加所需的值,并以编程方式检索它们。
"My" keyword is a VB.NET feature which cannot be used as is in C#.
What could be the closest feature in C# is to add a Settings file; this file will by default be in the "Properties" namespace, and you can add the values you need to it, and retrieve them programmatically.


这篇关于我的设置不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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