I think API wise it’s a dangerous choice, time to time we hit NullReferenceException when use GetNamedRanges(). It’s better to return an empty array instead of null.
Thank you for response, Babar. I think you misunderstood my previous post. I don’t observe any bugs in the implementation of this particular API. As as far as I see returning null is a design choice (confirmed in your response). My point is that this is a very poor design and leads to bugs with NullReferenceException in user’s code. I personally hit it couple of times. When API is used it’s usually tested by a dev with a valid case when there are named ranges, and a bug for the case without named ranges sometimes escapes testing.