0

Please help. I am not seeing why this won't work. Thank you.

private void FNameTB_TextChanged(object sender, EventArgs e)
        {
            friend.FName = Console.ReadLine();
        }

        private void LNameTB_TextChanged(object sender, EventArgs e)
        {
            friend.LName = Console.ReadLine();
        }

        private void PhoneTB_MaskInputRejected(object sender, MaskInputRejectedEventArgs e)
        {
            friend.Phone = Console.ReadLine();
        }

        private void MonthTB_TextChanged(object sender, EventArgs e)
        {
            friend.BMonth = Convert.ToInt32(Console.ReadLine());
        }

        private  void DayTB_TextChanged(object sender, EventArgs e)
        {
            friend.BDay = Convert.ToInt32(Console.ReadLine());
        }

        
        
        private void EnterFriendBtn_Click(object sender, EventArgs e)
        {
            FileStream outFile = new FileStream("Friends.txt", FileMode.OpenOrCreate, FileAccess.Read, FileShare.ReadWrite);
            StreamWriter writer = new StreamWriter(outFile);
            writer.WriteLine(ToString());
                
            writer.Close();
            outFile.Close();
        }
1
Contributor
1
Reply
2
Views
5 Years
Discussion Span
Last Post by computerbear
0

I figured it out. I had my filestreams and streamwriters crossed and I moved all the readlines into the EnterFriendBtn.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.