Ejemplo n.º 1
0
 void BaglantiDinle()
 {
     while (true)
     {
         Mesaj mesaj = (Mesaj)bf.Deserialize(stream);
         lstConservation.Items.Add(mesaj);
     }
 }
Ejemplo n.º 2
0
        private void btnSend_Click(object sender, EventArgs e)
        {
            Mesaj msg = new Mesaj();

            msg.Gonderen = txtUser.Text;
            msg.Gonderim = DateTime.Now;
            msg.Mesaji   = txtSend.Text;
            lstConservation.Items.Add(msg);

            bf.Serialize(stream, msg);
            stream.Flush();
            txtSend.Clear();
            txtSend.Focus();
        }