writing to txtfiles
-
Hi I need some help I have a bit of code that i got from the tutorials on writing to text file. Problem is they used binary formatter.I dont want the text to be encrypted in binary.I want to see what has been written to txt. int id = int.Parse(textBox1.Text); string name = textBox2.Text; //create a new employee object Employee mp = new Employee(id, name); stream = File.Open("EmployeeInfo.txt",FileMode.Create,FileAccess.ReadWrite); BinaryFormatter bformatter = new BinaryFormatter(); bformatter.Serialize(stream, mp); stream.Close(); If someone could please help me out
-
Hi I need some help I have a bit of code that i got from the tutorials on writing to text file. Problem is they used binary formatter.I dont want the text to be encrypted in binary.I want to see what has been written to txt. int id = int.Parse(textBox1.Text); string name = textBox2.Text; //create a new employee object Employee mp = new Employee(id, name); stream = File.Open("EmployeeInfo.txt",FileMode.Create,FileAccess.ReadWrite); BinaryFormatter bformatter = new BinaryFormatter(); bformatter.Serialize(stream, mp); stream.Close(); If someone could please help me out
Use the SoapFormatter[^] instead.
-
Hi I need some help I have a bit of code that i got from the tutorials on writing to text file. Problem is they used binary formatter.I dont want the text to be encrypted in binary.I want to see what has been written to txt. int id = int.Parse(textBox1.Text); string name = textBox2.Text; //create a new employee object Employee mp = new Employee(id, name); stream = File.Open("EmployeeInfo.txt",FileMode.Create,FileAccess.ReadWrite); BinaryFormatter bformatter = new BinaryFormatter(); bformatter.Serialize(stream, mp); stream.Close(); If someone could please help me out
-
Hi I need some help I have a bit of code that i got from the tutorials on writing to text file. Problem is they used binary formatter.I dont want the text to be encrypted in binary.I want to see what has been written to txt. int id = int.Parse(textBox1.Text); string name = textBox2.Text; //create a new employee object Employee mp = new Employee(id, name); stream = File.Open("EmployeeInfo.txt",FileMode.Create,FileAccess.ReadWrite); BinaryFormatter bformatter = new BinaryFormatter(); bformatter.Serialize(stream, mp); stream.Close(); If someone could please help me out
-
Hi I need some help I have a bit of code that i got from the tutorials on writing to text file. Problem is they used binary formatter.I dont want the text to be encrypted in binary.I want to see what has been written to txt. int id = int.Parse(textBox1.Text); string name = textBox2.Text; //create a new employee object Employee mp = new Employee(id, name); stream = File.Open("EmployeeInfo.txt",FileMode.Create,FileAccess.ReadWrite); BinaryFormatter bformatter = new BinaryFormatter(); bformatter.Serialize(stream, mp); stream.Close(); If someone could please help me out
StreamWriter sw = new StreamWriter(@"c:\filename.txt",false); sw.WriteLine((char)15); /// set char size while printing:laugh: sw.WriteLine("My name is: Jey"); sw.Close(); If u execute this code the text "My name is: Jey" inside the txt file. in "C Drive" and the file name "filename.txt" Jey