Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/visual-studio/7.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# C-VisualStudio建议将属性重命名为已存在的其他属性_C#_Visual Studio - Fatal编程技术网

C# C-VisualStudio建议将属性重命名为已存在的其他属性

C# C-VisualStudio建议将属性重命名为已存在的其他属性,c#,visual-studio,C#,Visual Studio,代码如下: namespace Phylor.Application.FrontEnd.Search.Models.Adjudication { public class ResultsGridViewModel { public List<ResultGridProductModel> NmResult = new List<ResultGridProductModel>(); public List<ResultG

代码如下:

namespace Phylor.Application.FrontEnd.Search.Models.Adjudication
{
    public class ResultsGridViewModel
    {
        public List<ResultGridProductModel> NmResult = new List<ResultGridProductModel>();
        public List<ResultGridProductModel> WlsResult = new List<ResultGridProductModel>();
        public List<ResultGridPepModel> PepResult = new List<ResultGridPepModel>();
        public List<ResultGridProductModel> MedResult = new List<ResultGridProductModel>();
    }

    public class ResultGridProductModel
    {
        public long ResultId { get; set; }
        public string Url { get; set; }
        public string ProductId { get; set; }
        public string Category { get; set; }
        public string Identifier { get; set; }
        public string IndividualName { get; set; }
        public string EntityName { get; set; }
        public string Remarks { get; set; }
        public string Text { get; set; }
        public string Address { get; set; }
        public string DateOfBirth { get; set; }
        public string PlaceOfBirth { get; set; }
        public string Score { get; set; }
        public string Age { get; set; }
        public string Gender { get; set; }
        public string Race { get; set; }
        public string Nationality { get; set; }
        public string EyeColor { get; set; }
        public string Height { get; set; }
        public string Weight { get; set; }
        public string HairColor { get; set; }
        public string SourceRegion { get; set; }
        public string Program { get; set; }
        public string AliasList { get; set; }
        public string Caution { get; set; }
        public string SourceAgencyName { get; set; }
        public string SourceAgencyAcronym { get; set; }
        public string SourceParentAgency { get; set; }
        public string SourceCountry { get; set; }
        public string ServiceName { get; set; }
        public bool IsMatch { get; set; }
    }
现在看截图,看看我在VisualStudio中看到了什么,特别是SourceCountry


我以前从未见过这种虚线断线,谷歌并没有帮助我理解它是什么。这个边框是什么意思?为什么它建议我将Caution重命名为它?

这只是一个建议,虚线边框只是为当前操作选择的文本的突出显示


如果您不想重命名,您可以忽略它。此外,我们都知道,这只是一个建议。

您可能错误地编辑了它,然后进行了更正。您是否复制粘贴了Caution属性以创建新的SourceCountry行?Visual Studio正试图巧妙地建议您需要重构其他代码以匹配新名称。重命名建议发生在您重命名变量时,因此如果不需要重命名变量,您可以忽略它。请尝试构建代码,看看它是否消失。同时在你的解决方案中搜索“小心”一词,看看你是否找到了什么?您可能已将caution属性复制到此行。@DavidG您锁定了它。我就是这么做的!谢谢你的信息!嗨,Nicholas-欢迎来到Stack Overflow!实际上,您对虚线边框的声明只是为当前操作选择的文本的一个突出显示,这是不正确的。这个讨厌的小边界就在那里,无论你在解决方案中点击到哪里,它都不会消失。