BlackFox.Win32.Icons.ExtractInformationsFromRegistryString C# (CSharp) Метод

ExtractInformationsFromRegistryString() публичный статический Метод

Parse strings in registry who contains the name of the icon and the index of the icon an return both parts.
public static ExtractInformationsFromRegistryString ( string regString, string &fileName, int &index ) : void
regString string The full string in the form "path,index" as found in registry.
fileName string The "path" part of the string.
index int The "index" part of the string.
Результат void
        public static void ExtractInformationsFromRegistryString(
            string regString, out string fileName, out int index)
        {
            if (regString == null)
            {
                throw new ArgumentNullException("regString");
            }
            if (regString.Length == 0)
            {
                throw new ArgumentException("The string should not be empty.", "regString");
            }

            index = 0;
            string[] strArr = regString.Replace("\"", "").Split(',');
            fileName = strArr[0].Trim();
            if (strArr.Length > 1)
            {
                int.TryParse(strArr[1].Trim(), out index);
            }
        }