AmazonScrape.MainWindow.AddResultToGrid C# (CSharp) Method

AddResultToGrid() private method

Takes a validated result and adds it to the datagrid
private AddResultToGrid ( AmazonItem result ) : void
result AmazonItem
return void
        void AddResultToGrid(AmazonItem result)
        {
            if (result == null) return;
            // Add results to the data grid as soon as they are available
                try
                { ResultGrid.Items.Add(result); }
                catch
                {
                    string msg = "Error adding item to the result grid: " +
                        result.ToString();
                    Debug.WriteLine(msg);
                }
        }