Beispiel #1
0
        /// <summary>
        /// Returns all the system registered file type extensions.
        /// </summary>
        /// <param name="withDot">
        /// Optional. Specifies whether to add a dot before the extension (.ext).
        /// Default is true.
        /// </param>s
        public List <string> GetSystemFileTypes(bool withDot = true)
        {
            var s = new List <string>();

            //Get the icons info
            SystemFileType.iconsInfo = SystemFileType.GetFileTypeAndIcon();

            //Loads file types into list
            foreach (object objString in SystemFileType.iconsInfo.Keys)
            {
                //Check for dot at start
                s.Add((string)(withDot ? objString : ((string)objString).TrimStart('.')));
            }

            //Return the list
            return(s);
        }