ChangeIP.Source.ReadIPList.ReadTxtFile C# (CSharp) Method

ReadTxtFile() public method

public ReadTxtFile ( ) : void
return void
        public void ReadTxtFile()
        {
            FileInfo existFile = new FileInfo(_filePath);
            if (existFile.Exists == true)
            {
                FileStream fs = new FileStream(_filePath, FileMode.Open, FileAccess.Read);
                StreamReader sr = new StreamReader(fs, System.Text.Encoding.Default);
                sr.BaseStream.Seek(0, SeekOrigin.Begin);
                while (!sr.EndOfStream)
                {
                    this.tempString = sr.ReadLine();
                    if (string.CompareOrdinal(this.tempString, "") != 0)
                    {
                        this.tempParseString = this.tempString.Split(' ');
                        myIpList.Add(new IpList(this.tempParseString[(int)Addr.macAddress], this.tempParseString[(int)Addr.ipAddress],
                            this.tempParseString[(int)Addr.subnetMask], this.tempParseString[(int)Addr.gatewayAddress],
                            this.tempParseString[(int)Addr.mainDns], this.tempParseString[(int)Addr.subDns], this.tempParseString[(int)Addr.hostName]));
                        this.lineCounter++;
                    }
                }
                sr.Close();
                fs.Close();
            }
            else
            {
                MessageBox.Show("List파일이 존재하지 않습니다.");
                return;
            }
        }