关于代码中的大规模替换
在编制大规模程序代码的时候,出现一些由于粗心大意导致的大小写问题如下粉红色标记,如何实现快速实现CheckedListBoxPossibleValue替换为小写的checkedListBoxPossibleValue;
InitializeComponent();
// Add a tenth element to the CheckedListBox.
this.CheckedListBoxPossibleValue.Items.Add("eleven");
}
private void Form1_Click(object sender, EventArgs e)
{
}
private void buttonMove_Click(object sender, EventArgs e)
{
// Check if there are any checked items in the CheckedListBox.
if (this.CheckedListBoxPossibleValue.CheckedItems.Count > 0)
{
// Clear the ListBox we'll move the selections to
this.listBoxSelected.Items.Clear();
// Loop through the CheckedItems collection of the CheckedListBox
// and add the items in the Selected ListBox
foreach (string item in this.CheckedListBoxPossibleValue.CheckedItems)
{
this.listBoxSelected.Items.Add(item.ToString());
}
// Clear all the checks in the CheckedListBox
for (int i = 0; i < this.checkedListBoxPossibleValue.Items.Count; i++)
this.checkedListBoxPossibleValue.SetItemChecked(i, false);
}
}