private void searchValuesComboBox_TextChanged(object sender, TextChangedEventArgs e)

        {
            valueCountTextBox.Text = "";
            try
            {
                this.searchValuesComboBox.Text = Int32.Parse(valueCountTextBox.Text);
                this.valueCountTextBox.Text    = Ex3dCalculations.ValueCount(values, searchValue);
                //can't figure this out.
            }
            catch
            {
            }

            // this is what I should have used. 12/20/18
            //valueCountTextBox.Text = "";
            //try
            //{
            //    int value = Int32.Parse(searchRangesComboBox.Text);
            //    this.valueCountTextBox.Text = Ex3dCalculations.ValueCount(values, value).ToString();
            //}

            //catch
            //{

            //}
        }
        private void searchRangesComboBox_TextChanged(object sender, TextChangedEventArgs e)

        {
            int dashIndex = this.searchRangesComboBox.Text.IndexOf('-');

            string strSearchMin = this.searchRangesComboBox.Text.Substring(0, dashIndex).Trim();

            string strSearchMax = this.searchRangesComboBox.Text.Substring(dashIndex + 1).Trim();



            try
            {
                rangeCountTextBox.Text = Ex3dCalculations.RangeCount(values, strSearchMin, strSearchMax);
            }
            catch { }

            //this is what I should have used.
            //try
            //{

            //    int dashIndex = this.searchRangesComboBox.Text.IndexOf('-');

            //    string strSearchMin = this.searchRangesComboBox.Text.Substring(0, dashIndex).Trim();

            //    string strSearchMax = this.searchRangesComboBox.Text.Substring(dashIndex + 1).Trim();

            //    rangeCountTextBox.Text = Ex3dCalculations.RangeCount(values, strSearchMin, strSearchMax);
            //}
            //catch
            //{

            //}
        }
        private void Window_Loaded(object sender, RoutedEventArgs e)

        {
            this.valuesTextBox.Text = Ex3dCalculations.ArrayToString(this.values);
        }