Click here to Skip to main content
15,920,596 members
Home / Discussions / C#
   

C#

 
GeneralRe: How to create a progressBar? Pin
chaiguy133719-Aug-08 15:50
chaiguy133719-Aug-08 15:50 
Questionweb service Pin
amarnath n.n19-Aug-08 1:32
amarnath n.n19-Aug-08 1:32 
AnswerRe: web service Pin
Christian Graus19-Aug-08 1:40
protectorChristian Graus19-Aug-08 1:40 
QuestionForeach exception Pin
Scalee19-Aug-08 1:30
Scalee19-Aug-08 1:30 
AnswerRe: Foreach exception Pin
Christian Graus19-Aug-08 1:41
protectorChristian Graus19-Aug-08 1:41 
GeneralRe: Foreach exception Pin
Scalee19-Aug-08 1:57
Scalee19-Aug-08 1:57 
GeneralOff topic Pin
chaiguy133719-Aug-08 15:53
chaiguy133719-Aug-08 15:53 
GeneralRe: Foreach exception Pin
Pete O'Hanlon19-Aug-08 1:46
mvePete O'Hanlon19-Aug-08 1:46 
Well, for a start, you know what exception you are getting so you should explicitly handle that one. This your code would become:
foreach (string file in files)
{
  try
  {
    File.Copy(file, targetDirectory);
  }
  catch (UnauthorizedAccessException uae)
  {
    // Log the file
    Debug.Writeline("Unable to write file {0}", file);
  }
}


Deja View - the feeling that you've seen this post before.

My blog | My articles



QuestionAnonymous Delegates problem. [modified] Pin
hdv21219-Aug-08 1:03
hdv21219-Aug-08 1:03 
AnswerRe: Anonymous Delegates problem. Pin
Daniel Grunwald19-Aug-08 1:39
Daniel Grunwald19-Aug-08 1:39 
GeneralRe: Anonymous Delegates problem. Pin
hdv21219-Aug-08 1:48
hdv21219-Aug-08 1:48 
GeneralRe: Anonymous Delegates problem. Pin
N a v a n e e t h19-Aug-08 3:17
N a v a n e e t h19-Aug-08 3:17 
Questionplease Help Pin
Mosd19-Aug-08 0:59
Mosd19-Aug-08 0:59 
AnswerRe: please Help Pin
Abhijit Jana19-Aug-08 1:18
professionalAbhijit Jana19-Aug-08 1:18 
QuestionConvert standard string into rtf format. Pin
CodingLover19-Aug-08 0:37
CodingLover19-Aug-08 0:37 
AnswerRe: Convert standard string into rtf format. Pin
Pete O'Hanlon19-Aug-08 1:02
mvePete O'Hanlon19-Aug-08 1:02 
GeneralRe: Convert standard string into rtf format. Pin
blackjack215019-Aug-08 2:12
blackjack215019-Aug-08 2:12 
AnswerRe: Convert standard string into rtf format. Pin
PIEBALDconsult19-Aug-08 4:29
mvePIEBALDconsult19-Aug-08 4:29 
GeneralRe: Convert standard string into rtf format. Pin
chaiguy133719-Aug-08 15:57
chaiguy133719-Aug-08 15:57 
QuestionRe: Convert standard string into rtf format. Pin
CodingLover19-Aug-08 16:07
CodingLover19-Aug-08 16:07 
QuestionReading PDFs? Pin
Megidolaon18-Aug-08 23:52
Megidolaon18-Aug-08 23:52 
AnswerRe: Reading PDFs? Pin
Christian Graus19-Aug-08 1:19
protectorChristian Graus19-Aug-08 1:19 
AnswerRe: Reading PDFs? Pin
blackjack215019-Aug-08 2:03
blackjack215019-Aug-08 2:03 
GeneralRe: Reading PDFs? Pin
Megidolaon19-Aug-08 3:54
Megidolaon19-Aug-08 3:54 
GeneralRe: Reading PDFs? Pin
blackjack215019-Aug-08 19:07
blackjack215019-Aug-08 19:07 

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.