Is there any reason you do not want to use routines from the
framework?

To iterate through the args array, you could use 'foreach'.
To copy a file, you can use File.Copy()
Also, there's no reason you cannot encase the entire block of code in
one try...catch statement.

On Nov 4, 4:58 am, Theraot <[EMAIL PROTECTED]> wrote:
> Actaully visual studio is pretty "smart", to answer:
>
> return, ends the method, in this case the main procedure, so you are
> telling the program to end in this case.
>
> about the error, look at where you have the initailization of fin and
> fout, they are inside of a try block, if it initializes ok tehn the
> code continues.
>
> If fin fails to initialize the catch will get any
> FileNotFoundException, given the parameters, and checking to MSDN
> documentation, FileNotFoundException is the unique exception that may
> happen. now look the code in the catch, it says that the program ends,
> so no futher execution. so Visual Studio syas: "ah, if the code
> reached here where VIKAS GARG, uses the fin variable, it got to be
> initialized", if you take out the return, there is the the possibility
> of it being not initialized, so you get the error.
>
> [the same is applicable for fout and it's own try block]

Reply via email to