Converting an array object to dictionary - Its getting NullReference Error

Viewed 8

Product[] productsarray = new Product[5];

Dictionary<int, Product> products = productsarray.ToDictionary(key => key.productId, p => p);

0 Answers
Related