/// <inheritdoc /> public override int GetHashCode() { unchecked { return((StandardFolder.GetHashCode() * 397) ^ (CustomFolder != null ? CustomFolder.GetHashCode() : 0)); } }
/// <summary> /// Creates Pidl object according to specified StandardFolder enumeration member. /// </summary> /// <param name="standardFolder">StandardFolder identifier.</param> /// <returns>Returns new Pidl object.</returns> public static Pidl Create(StandardFolder standardFolder) { IntPtr pidl = IntPtr.Zero; int result = NativeMethods.SHGetSpecialFolderLocation(IntPtr.Zero, (int)standardFolder, out pidl); if (result != S_OK || pidl == IntPtr.Zero) { return(null); } return(new Pidl(pidl)); }