Click here to Skip to main content
15,896,063 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
Hi guys,

Yesterday i had interview in that, he asked me.

Q)Write a code, to download multiple files using threads in c#?
Q)What is Task in visual studio?

can anyone please explain me, how these.

What I have tried:

I know threads, but how to implements to download multiple files.


Please help me.


Thanks
Posted
Updated 10-May-16 21:40pm
Comments
Sergey Alexandrovich Kryukov 11-May-16 3:22am    
Perhaps you don't know threads. Or anything else?
Anyway, preparing interview questions is pointless.
Now, read carefully:
What have you tried so far?
—SA

1 solution

A task, in Visual Studio, is something you do. A Task in the .NET framework is something completely different. I could make an assumption that you mean the Task Parallel Library but that would just be an assumption. If that is the one you mean, then I would suggest that you Google it - learning how to Google things effectively is a hugely valuable skill that will serve you well in life.

As for downloading the files, the pseudo-code would look something like this:
For Each File in A List Of Files
  Launch a thread - taking one of these files
  Download this file
End For Each
 
Share this answer
 
Comments
abdul subhan mohammed 11-May-16 5:20am    
Thanks

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900