Click here to Skip to main content
       

C#

 
GeneralRe: Boolean function to return true/false PinmemberMatt T Heffron7-Jan-13 11:57 
GeneralRe: Boolean function to return true/false PinmemberMember 97041537-Jan-13 12:02 
QuestionC# data tranfer to form in textbox PinmemberMember 970663330-Dec-12 2:44 
AnswerRe: C# data tranfer to form in textbox PinmvpRichard MacCutchan30-Dec-12 4:29 
GeneralRe: C# data tranfer to form in textbox PinmemberMember 970663330-Dec-12 8:07 
GeneralRe: C# data tranfer to form in textbox PinmvpRichard MacCutchan30-Dec-12 22:10 
AnswerRe: C# data tranfer to form in textbox PinmemberBillWoodruff3-Jan-13 17:37 
QuestionHow to solve the following problem using StreamReader. Pinmemberdr_iton30-Dec-12 0:20 
I have a problem reading lines and showing them from a text file in a ListBox using Windows Form Application.
I made some code but now I'm stucked in a place where I made a comment.
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.IO;
 
namespace LlogariaBankare
{
    public partial class KlientForm : Form
    {
        public string pathi = "Klientet.txt";
        public KlientForm()
        {
            InitializeComponent();
        }
 
        private void KlientForm_Load(object sender, EventArgs e)
        {
            this.ShtoButon.Enabled = true;
            this.AzhuroButon.Enabled = false;
            this.FshijButon.Enabled = false;
 
        }
        
 
        private void ShtoButon_Click(object sender, EventArgs e)
        {
                    
            StreamWriter swKlientet = new StreamWriter(pathi, true);
            swKlientet.WriteLine(emriBox.Text + "\t" + mbiemriBox.Text + "\t" +
                datelindjaBox.Text + "\t" + vendlindjaBox.Text + "\t" +
                xhirollogariaBox.Text + "\t");
            swKlientet.Close();
        
        }
 
        private void ListBox_SelectedIndexChanged(object sender, EventArgs e)
        {
          /* what code i have to write here to read lines from text file and show the lines here*/
 
        }
    }
}

AnswerRe: How to solve the following problem using StreamReader. Pinmemberjibesh30-Dec-12 1:19 
AnswerRe: How to solve the following problem using StreamReader. PinmvpRichard MacCutchan30-Dec-12 2:37 
GeneralRe: How to solve the following problem using StreamReader. Pinmemberdr_iton31-Dec-12 14:38 
GeneralRe: How to solve the following problem using StreamReader. PinmvpRichard MacCutchan31-Dec-12 22:36 
GeneralRe: How to solve the following problem using StreamReader. Pinmemberdr_iton1-Jan-13 8:58 
GeneralRe: How to solve the following problem using StreamReader. PinmvpRichard MacCutchan1-Jan-13 22:11 
GeneralRe: How to solve the following problem using StreamReader. Pinmemberdr_iton4-Jan-13 10:17 
GeneralRe: How to solve the following problem using StreamReader. PinmvpRichard MacCutchan5-Jan-13 1:18 
GeneralRe: How to solve the following problem using StreamReader. Pinmemberdr_iton5-Jan-13 2:58 
GeneralRe: How to solve the following problem using StreamReader. PinmvpRichard MacCutchan5-Jan-13 3:04 
QuestionData in GridView is not being displayed correctly PinmemberMember 970415329-Dec-12 11:02 
AnswerRe: Data in GridView is not being displayed correctly PinmemberLampridis Vasilis29-Dec-12 23:09 
GeneralRe: Data in GridView is not being displayed correctly PinmemberMember 970415329-Dec-12 23:26 
GeneralRe: Data in GridView is not being displayed correctly PinmemberLampridis Vasilis29-Dec-12 23:32 
GeneralRe: Data in GridView is not being displayed correctly PinmemberMember 970415329-Dec-12 23:39 
GeneralRe: Data in GridView is not being displayed correctly Pinmemberjibesh29-Dec-12 23:54 
GeneralRe: Data in GridView is not being displayed correctly PinmemberMember 970415330-Dec-12 0:02 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.


Advertise | Privacy | Mobile
Web04 | 2.8.140821.2 | Last Updated 22 Aug 2014
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid