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

ExtractIntegerValue() private method

private ExtractIntegerValue ( string strValue ) : int
strValue string
return int
        private 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." );
            }
        }