鉴于班级:
class BaseController
{
BaseView _baseView;
BaseModel _baseModel;
}
Run Code Online (Sandbox Code Playgroud)
在使用 Visual Studio 的建议命名时,它为我提供了名称base,而不是baseView. 我设法_通过选项、文本编辑器、c#、代码样式添加了前缀。但我看不到如何控制建议的字段名称建议。
我想知道,如果这可以被控制,因此建议_baseView和_baseModel等。
目前我有包含两个字符串的对象:
class myClass
{
public string string1 { get; set; }
public string string2 { get; set; }
public bool MatcheString1(string newString)
{
if (this.string1 == newString)
{
return true;
}
return false;
}
}
Run Code Online (Sandbox Code Playgroud)
然后,我有一个第二个类,使用List列出上述对象.
class URLs : IEnumerator, IEnumerable
{
private List<myClass> myCustomList;
private int position = -1;
// Constructor
public URLs()
{
myCustomList = new List<myClass>();
}
}
Run Code Online (Sandbox Code Playgroud)
在那个类中,我正在使用一种方法来检查列表中是否存在字符串
// We can also check if the URL string is present in the collection
public bool ContainsString1(string newString) …Run Code Online (Sandbox Code Playgroud)