Accord.Imaging.Formats.FITSCodec.ExtractIntegerValue C# (CSharp) Method

ExtractIntegerValue() private static method

private static ExtractIntegerValue ( string strValue ) : int
strValue string
return int
        private static int ExtractIntegerValue(string strValue)
        {
            try
            {
                // split value from comment
                string[] strs = strValue.Split('/');

                // return value as integer
                return int.Parse(strs[0].Trim());
            }
            catch
            {
                throw new ArgumentException("The stream does not contain valid FITS image.");
            }
        }