Click here to Skip to main content
16,004,901 members
Home / Discussions / C#
   

C#

 
GeneralRe: Nullables in type parameters? Pin
Christian Graus18-Oct-06 8:15
protectorChristian Graus18-Oct-06 8:15 
AnswerRe: Nullables in type parameters? Pin
Vega0219-Oct-06 17:19
Vega0219-Oct-06 17:19 
QuestionMultiple Conditions in DataView.ROWFILTER Pin
PaulaM18-Oct-06 1:51
PaulaM18-Oct-06 1:51 
AnswerRe: Multiple Conditions in DataView.ROWFILTER Pin
Robert Rohde18-Oct-06 2:02
Robert Rohde18-Oct-06 2:02 
Question[Solved]Setting Bold Fonts on Nodes of a TreeView Pin
Sebastian Schneider18-Oct-06 1:51
Sebastian Schneider18-Oct-06 1:51 
AnswerRe: Setting Bold Fonts on Nodes of a TreeView Pin
Robert Rohde18-Oct-06 2:04
Robert Rohde18-Oct-06 2:04 
GeneralRe: Setting Bold Fonts on Nodes of a TreeView Pin
Sebastian Schneider18-Oct-06 2:06
Sebastian Schneider18-Oct-06 2:06 
Questionmerging files Pin
Yustme18-Oct-06 1:49
Yustme18-Oct-06 1:49 
Hi,

I made an arraylist and put there 10 txt files. And i got 10 checkboxes.

I want to bind the checkboxes (which are also in an array type of CheckBox)
with the corresponding index of the arraylist.

And after that i want to merge all the files into one file.

This is the code:

private CheckBox[] checkBox = new CheckBox[10];

public void Method()
{
ArrayList fileArray = new ArrayList();

string file1 = File.ReadAllText("file1.txt");
string file2 = File.ReadAllText("file2.txt");
string file3 = File.ReadAllText("file3.txt");
string file4 = File.ReadAllText("file4.txt");
string file5 = File.ReadAllText("file5.txt");
string file6 = File.ReadAllText("file6.txt");
string file7 = File.ReadAllText("file7.txt");
string file8 = File.ReadAllText("file8.txt");
string file9 = File.ReadAllText("file9.txt");
string file10 = File.ReadAllText("file10.txt");


fileArray.Add(file1);
fileArray.Add(file2);
fileArray.Add(file3);
fileArray.Add(file4);
fileArray.Add(file5);
fileArray.Add(file6);
fileArray.Add(file7);
fileArray.Add(file8);
fileArray.Add(file9);
fileArray.Add(file10);

foreach (Control chkBx in this.gbxLanguageLongSound.Controls)
{
if (chkBx is CheckBox)
{
for (int i = 0; i < 10; i++)
{
CheckBox currentCheckBox = (CheckBox)this.checkBox["checkbox" + (i+1)];
if (currentCheckBox.Checked == true)
{
File.WriteAllText("CombinedFiles.txt", filesOfCheckedBoxes);
}
}
}
}

I hope i made myself clear.

Thanks in advance!
AnswerRe: merging files Pin
Christian Graus18-Oct-06 2:03
protectorChristian Graus18-Oct-06 2:03 
GeneralRe: merging files Pin
Yustme18-Oct-06 2:16
Yustme18-Oct-06 2:16 
GeneralRe: merging files Pin
Christian Graus18-Oct-06 4:07
protectorChristian Graus18-Oct-06 4:07 
AnswerRe: merging files Pin
Larantz19-Oct-06 12:10
Larantz19-Oct-06 12:10 
Questionhow to insert picture in MS ACCESS table Pin
PavanPareta18-Oct-06 1:32
PavanPareta18-Oct-06 1:32 
AnswerRe: how to insert picture in MS ACCESS table Pin
Christian Graus18-Oct-06 1:33
protectorChristian Graus18-Oct-06 1:33 
Questiontrapping sqlexception Pin
DownBySpj18-Oct-06 1:23
DownBySpj18-Oct-06 1:23 
AnswerRe: trapping sqlexception Pin
Paul Brower18-Oct-06 4:56
Paul Brower18-Oct-06 4:56 
QuestionHow to convert bmp or jpg into DICOM? Pin
Dejan Paunovic18-Oct-06 1:06
Dejan Paunovic18-Oct-06 1:06 
AnswerRe: How to convert bmp or jpg into DICOM? Pin
Christian Graus18-Oct-06 1:30
protectorChristian Graus18-Oct-06 1:30 
QuestionDatagrid and repeater allow paging Pin
iyoko18-Oct-06 0:45
iyoko18-Oct-06 0:45 
AnswerRe: Datagrid and repeater allow paging Pin
bhanu1234518-Oct-06 21:05
bhanu1234518-Oct-06 21:05 
GeneralRe: Datagrid and repeater allow paging Pin
iyoko21-Oct-06 5:34
iyoko21-Oct-06 5:34 
QuestionFtpClientConnection Pin
toink toink18-Oct-06 0:43
toink toink18-Oct-06 0:43 
QuestionChanging settings of an installed windows service. Pin
kulile18-Oct-06 0:33
kulile18-Oct-06 0:33 
QuestionInserting into a multiple Datasets with 1 method Pin
Gareth H17-Oct-06 23:49
Gareth H17-Oct-06 23:49 
AnswerRe: Inserting into a multiple Datasets with 1 method Pin
Robert Rohde18-Oct-06 0:10
Robert Rohde18-Oct-06 0:10 

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.