Click here to Skip to main content
15,880,469 members
Home / Discussions / C#
   

C#

 
GeneralRe: Problem with FolderBrowserDialog Class Pin
Heath Stewart31-Dec-03 4:09
protectorHeath Stewart31-Dec-03 4:09 
GeneralRe: Problem with FolderBrowserDialog Class Pin
ta1001-Jan-04 6:31
ta1001-Jan-04 6:31 
GeneralPrinting Form Pin
IntegraSoft30-Dec-03 13:44
IntegraSoft30-Dec-03 13:44 
GeneralRe: Printing Form Pin
Mazdak30-Dec-03 19:41
Mazdak30-Dec-03 19:41 
GeneralRe: Printing Form Pin
Heath Stewart30-Dec-03 19:42
protectorHeath Stewart30-Dec-03 19:42 
QuestionDrawing panels in ownerdraw listbox? Pin
pwinant30-Dec-03 13:31
pwinant30-Dec-03 13:31 
GeneralPublic/Private Keys Pin
Guinness4Strength30-Dec-03 11:15
Guinness4Strength30-Dec-03 11:15 
GeneralExecuting code for more than 1 statements Pin
Melanius30-Dec-03 10:42
Melanius30-Dec-03 10:42 
Hello, i am trying to make an application that will be nested within another app and will 1) create a BackUP folder if it doesn't exist, and 2) it will check for a number of files to see which exist and which not in the backup and act as told.

So far i made it check for the backup folder and create one but i can't execute more than one 'if' expression, thus i get stuck with only copying (back up) only one file. here's a fragment of the the code:
		public static void FilesExist()<br />
		{<br />
                        //original files dir and backup dir.<br />
			string[] strOFiles;<br />
			strOFiles = new string[16];<br />
			strOFiles[0] = @"..\login.cfg";<br />
			strOFiles[1] = @".\BackUp\file1.cfg";<br />
			strOFiles[2] = @"..\multi.idx";<br />
			strOFiles[3] = @".\BackUp\file2.cfg";<br />
<br />
			if (!File.Exists(strOFiles[1]))<br />
			{<br />
				File.Copy(strOFiles[0], strOFiles[1]);<br />
			}<br />
			else if (!File.Exists(strOFiles[3]))<br />
			{<br />
				File.Copy(strOFiles[2], strOFiles[3]);<br />
				return;<br />
			}<br />
<br />
		}


maybe use a 'switch' stament, without a 'break;' until all code gets executed? thanks in advance Smile | :)
GeneralRe: Executing code for more than 1 statements Pin
Colin Angus Mackay30-Dec-03 10:54
Colin Angus Mackay30-Dec-03 10:54 
GeneralRe: Executing code for more than 1 statements Pin
Heath Stewart30-Dec-03 11:27
protectorHeath Stewart30-Dec-03 11:27 
GeneralRe: Executing code for more than 1 statements Pin
Melanius30-Dec-03 11:30
Melanius30-Dec-03 11:30 
GeneralRe: Executing code for more than 1 statements Pin
Melanius31-Dec-03 6:46
Melanius31-Dec-03 6:46 
GeneralGuid in DataTable Pin
Mazdak30-Dec-03 9:30
Mazdak30-Dec-03 9:30 
GeneralRe: Guid in DataTable Pin
Heath Stewart30-Dec-03 11:23
protectorHeath Stewart30-Dec-03 11:23 
GeneralRe: Guid in DataTable Pin
Mazdak30-Dec-03 19:30
Mazdak30-Dec-03 19:30 
GeneralRe: Guid in DataTable Pin
Heath Stewart30-Dec-03 19:39
protectorHeath Stewart30-Dec-03 19:39 
GeneralRe: Guid in DataTable Pin
Mazdak30-Dec-03 19:57
Mazdak30-Dec-03 19:57 
GeneralForm flashes beneath an OpenFileDialog or 2nd Form Pin
flipdoubt30-Dec-03 4:15
flipdoubt30-Dec-03 4:15 
GeneralRe: Form flashes beneath an OpenFileDialog or 2nd Form Pin
Heath Stewart30-Dec-03 5:58
protectorHeath Stewart30-Dec-03 5:58 
GeneralValue in Database Pin
Mazdak30-Dec-03 1:17
Mazdak30-Dec-03 1:17 
GeneralRe: Value in Database Pin
Heath Stewart30-Dec-03 5:51
protectorHeath Stewart30-Dec-03 5:51 
GeneralRe: Value in Database Pin
Mazdak30-Dec-03 6:32
Mazdak30-Dec-03 6:32 
GeneralRe: Value in Database Pin
Heath Stewart30-Dec-03 7:36
protectorHeath Stewart30-Dec-03 7:36 
GeneralRe: Value in Database Pin
Mazdak30-Dec-03 9:30
Mazdak30-Dec-03 9:30 
GeneralCreating an XML File Pin
deanoA29-Dec-03 22:08
deanoA29-Dec-03 22:08 

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.