我的代码:
ws.CategoryConfiguration cc = new ws.CategoryConfiguration();
cc.LoadChildProducts = true;
cc.ChildProducts.SearchOptions.PropertiesToReturn = new string[] { "BasePrice" };
当我运行它时,我得到了一个NullReferenceException
上ChildProducts
线。我知道那string[]
是一个对象,因为它就在那里,所以它一定是PropertiesToReturn
。有谁知道是什么问题?LoadChildProducts
工作没有任何问题。