diff --git a/Windows.Shell/BindContext.cs b/Windows.Shell/BindContext.cs index eb37efd3..6b65120d 100644 --- a/Windows.Shell/BindContext.cs +++ b/Windows.Shell/BindContext.cs @@ -149,11 +149,7 @@ namespace Vanara.Windows.Shell /// in a return value of E_NOTIMPL. /// /// - public IEnumerable EnumObjectParam() - { - ((IBindCtxV)this).EnumObjectParam(out var ppenum).ThrowIfFailed(); - return ppenum.Enum().ToArray(); - } + public IEnumerable EnumObjectParam() => ((IBindCtxV)this).EnumObjectParam(out var ppenum).Succeeded ? ppenum.Enum().ToArray() : new string[0]; /// /// Retrieves an interface pointer to the object associated with the specified key in the bind context's string-keyed table of pointers.