Click here to Skip to main content
15,892,768 members
Home / Discussions / C#
   

C#

 
GeneralRe: need help in the Process class Pin
Nick Parker13-Sep-04 12:35
protectorNick Parker13-Sep-04 12:35 
GeneralRe: need help in the Process class Pin
bora3ee14-Sep-04 8:32
bora3ee14-Sep-04 8:32 
QuestionWhere is "LicenseKey" tag of Crystal Reports? Pin
Khang Nguyen13-Sep-04 11:30
Khang Nguyen13-Sep-04 11:30 
AnswerRe: Where is "LicenseKey" tag of Crystal Reports? Pin
Heath Stewart13-Sep-04 11:37
protectorHeath Stewart13-Sep-04 11:37 
GeneralRe: Where is "LicenseKey" tag of Crystal Reports? Pin
Khang Nguyen13-Sep-04 11:45
Khang Nguyen13-Sep-04 11:45 
GeneralRe: Where is "LicenseKey" tag of Crystal Reports? Pin
Heath Stewart13-Sep-04 11:52
protectorHeath Stewart13-Sep-04 11:52 
GeneralRe: Where is "LicenseKey" tag of Crystal Reports? Pin
Khang Nguyen13-Sep-04 12:21
Khang Nguyen13-Sep-04 12:21 
QuestionA text read and write question??? Pin
cemlouis13-Sep-04 11:26
cemlouis13-Sep-04 11:26 
Hi,

I have a file which contains 13726 names on a text file (my school's students' names). Every line contains one name. And I have a textbox on a form which gets the name of the file and when I press the button it has to make seperate files which has 300 names in it. I mean I have to seperate these 13726 names on different files which has must contain 300 names and the last one must have 276 names in it. I made my button's function like below:
<br />
		private void button1_Click(object sender, System.EventArgs e)<br />
		{<br />
			int a=1; int b=1; int k;<br />
			StreamReader re = File.OpenText(textBox1.Text.ToString()+".txt");<br />
			string input = null;<br />
			ArrayList arrText = new ArrayList();<br />
			while ((input = re.ReadLine()) != null)<br />
			{<br />
				arrText.Add(input);<br />
				if(a%300 == 0)<br />
				{<br />
					FileInfo t = new FileInfo(textBox1.Text.ToString()+"_"+ b + ".txt");<br />
					StreamWriter Tex = t.CreateText();<br />
					for(k=(b-1)*300;k<(300*b)+1;k++)<br />
					{<br />
						if(k==0)<br />
						{<br />
							Tex.WriteLine(arrText[k+1]);<br />
						}<br />
						else<br />
						{<br />
							Tex.WriteLine(arrText[k]);<br />
						}<br />
					}<br />
					Tex.Write(Tex.NewLine);<br />
					Tex.Close();<br />
				}<br />
			a++;<br />
			}<br />
			re.Close();<br />
		}<br />

but I couldn't get a result so any help would be greatly appreciated...

Thank you,
Cem Louis
AnswerRe: A text read and write question??? Pin
Mark Greenwood13-Sep-04 13:28
Mark Greenwood13-Sep-04 13:28 
QuestionWhich Row/Col When Mouse Hovers/Moves over DataGrid? Pin
Khang Nguyen13-Sep-04 11:18
Khang Nguyen13-Sep-04 11:18 
AnswerRe: Which Row/Col When Mouse Hovers/Moves over DataGrid? Pin
Nick Parker13-Sep-04 11:27
protectorNick Parker13-Sep-04 11:27 
GeneralRe: Which Row/Col When Mouse Hovers/Moves over DataGrid? Pin
Khang Nguyen14-Sep-04 4:09
Khang Nguyen14-Sep-04 4:09 
GeneralAccessing form controls Pin
13-Sep-04 11:10
suss13-Sep-04 11:10 
GeneralRe: Accessing form controls Pin
Christian Graus13-Sep-04 11:24
protectorChristian Graus13-Sep-04 11:24 
GeneralRe: Accessing form controls Pin
Heath Stewart13-Sep-04 11:48
protectorHeath Stewart13-Sep-04 11:48 
GeneralRe: Accessing form controls Pin
Member 132528214-Sep-04 13:49
Member 132528214-Sep-04 13:49 
GeneralRe: Accessing form controls Pin
Heath Stewart15-Sep-04 5:58
protectorHeath Stewart15-Sep-04 5:58 
GeneralRe: DateTime Pin
Nick Parker13-Sep-04 9:47
protectorNick Parker13-Sep-04 9:47 
GeneralRe: DateTime Pin
Heath Stewart13-Sep-04 11:33
protectorHeath Stewart13-Sep-04 11:33 
Generalneed help in the Process class Pin
bora3ee13-Sep-04 9:38
bora3ee13-Sep-04 9:38 
GeneralRe: need help in the Process class Pin
Nick Parker13-Sep-04 10:32
protectorNick Parker13-Sep-04 10:32 
GeneralRe: need help in the Process class Pin
Heath Stewart13-Sep-04 11:40
protectorHeath Stewart13-Sep-04 11:40 
GeneralWinForms - popup config windows in a specified area Pin
TheBlindWatchmaker13-Sep-04 9:23
TheBlindWatchmaker13-Sep-04 9:23 
GeneralRelease memory - newbie doubt Pin
ee9903513-Sep-04 6:55
ee9903513-Sep-04 6:55 
GeneralRe: Release memory - newbie doubt Pin
Nick Parker13-Sep-04 7:30
protectorNick Parker13-Sep-04 7:30 

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

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