I get an exception on the List.Add line when trying to run this code:
string searchText = searchByInterestBox.Text;
List<string> checkedItems = null;
if (m_BusinessLogic != null)
{
if (searchText != string.Empty)
{
try
{
interestResultBox.Items.Clear();
foreach (var itemChecked in InterestsCheckedListBox.CheckedItems)
{
checkedItems.Add(itemChecked.ToString());
}
While debugging, when reaching the last line of code (checkedItems.Add) it says "Object Reference not set to an instance of an object"
Any idea what did I do wrong with the string list?
Thanks a lot. Itzik.