Hi all, I write a small code to open the file my file contents are as follows each line length is 94 characters and line terminator is \r and \n
101 111111111 1111111111010190542A094101
9000000000001000000000000000000000000000000000000000000
// same Works for this text
101 111111111 1111111111010190608A094101
52001 1 1 CCD1 101019101019 1111000020000001
6201110000251 00000000011 1 1 0111000020000001
820000000100111000020000000000000000000000011 111000020000001
9000001000001000000010011100002000000000001000000000000
private void mnuOpen_Click(object sender, EventArgs e)
{
string strFilePath = string.Empty;
OpenFileDialog openFileDialog1 = new OpenFileDialog();
openFileDialog1.FileName = string.Empty;
openFileDialog1.RestoreDirectory = true;
if (openFileDialog1.ShowDialog() == DialogResult.OK)
{
strFilePath = openFileDialog1.FileName;
StreamReader sr = new StreamReader(strFilePath);
string str = string.Empty;
str = sr.ReadToEnd().Replace("\r", "").Replace("\n", "");
sr.Close();
if (str.Length % 94 == 0)
{
//Do some thing
}
}
But i am not getting an error here can any one tell why