Click here to Skip to main content
15,888,461 members
Home / Discussions / C#
   

C#

 
QuestionLINQ results getting modified? Pin
Stellar Developer9-Nov-20 13:52
Stellar Developer9-Nov-20 13:52 
AnswerRe: LINQ results getting modified? Pin
Gerry Schmitz9-Nov-20 14:49
mveGerry Schmitz9-Nov-20 14:49 
GeneralRe: LINQ results getting modified? Pin
Stellar Developer9-Nov-20 15:56
Stellar Developer9-Nov-20 15:56 
GeneralRe: LINQ results getting modified? Pin
Gerry Schmitz9-Nov-20 23:43
mveGerry Schmitz9-Nov-20 23:43 
SuggestionRe: LINQ results getting modified? Pin
Richard Deeming9-Nov-20 21:58
mveRichard Deeming9-Nov-20 21:58 
QuestionWhat's Wrong With This??? Pin
Kevin Marois8-Nov-20 19:00
professionalKevin Marois8-Nov-20 19:00 
AnswerRe: What's Wrong With This??? Pin
Jörgen Andersson8-Nov-20 20:11
professionalJörgen Andersson8-Nov-20 20:11 
AnswerRe: What's Wrong With This??? Pin
Richard Deeming8-Nov-20 21:47
mveRichard Deeming8-Nov-20 21:47 
GeneralRe: What's Wrong With This??? Pin
Kevin Marois9-Nov-20 7:42
professionalKevin Marois9-Nov-20 7:42 
QuestionC# - Use app between 2 times and get the time from database Pin
Valakik8-Nov-20 12:16
Valakik8-Nov-20 12:16 
AnswerRe: C# - Use app between 2 times and get the time from database Pin
Dave Kreskowiak8-Nov-20 18:54
mveDave Kreskowiak8-Nov-20 18:54 
AnswerRe: C# - Use app between 2 times and get the time from database Pin
Gerry Schmitz9-Nov-20 1:51
mveGerry Schmitz9-Nov-20 1:51 
QuestionWeird problem with Custom StreamReader with Read override not reading correct number of bytes during base method call Pin
pr1mem0ver6-Nov-20 16:24
pr1mem0ver6-Nov-20 16:24 
AnswerRe: Weird problem with Custom StreamReader with Read override not reading correct number of bytes during base method call Pin
Gerry Schmitz6-Nov-20 18:18
mveGerry Schmitz6-Nov-20 18:18 
GeneralRe: Weird problem with Custom StreamReader with Read override not reading correct number of bytes during base method call Pin
pr1mem0ver7-Nov-20 5:00
pr1mem0ver7-Nov-20 5:00 
GeneralRe: Weird problem with Custom StreamReader with Read override not reading correct number of bytes during base method call Pin
Gerry Schmitz7-Nov-20 5:37
mveGerry Schmitz7-Nov-20 5:37 
GeneralRe: Weird problem with Custom StreamReader with Read override not reading correct number of bytes during base method call Pin
pr1mem0ver7-Nov-20 13:25
pr1mem0ver7-Nov-20 13:25 
GeneralRe: Weird problem with Custom StreamReader with Read override not reading correct number of bytes during base method call Pin
Gerry Schmitz8-Nov-20 5:53
mveGerry Schmitz8-Nov-20 5:53 
GeneralRe: Weird problem with Custom StreamReader with Read override not reading correct number of bytes during base method call Pin
pr1mem0ver16-Nov-20 14:58
pr1mem0ver16-Nov-20 14:58 
AnswerRe: Weird problem with Custom StreamReader with Read override not reading correct number of bytes during base method call Pin
OriginalGriff8-Nov-20 1:35
mveOriginalGriff8-Nov-20 1:35 
GeneralRe: Weird problem with Custom StreamReader with Read override not reading correct number of bytes during base method call Pin
pr1mem0ver16-Nov-20 15:10
pr1mem0ver16-Nov-20 15:10 
AnswerRe: Weird problem with Custom StreamReader with Read override not reading correct number of bytes during base method call Pin
Richard Deeming8-Nov-20 21:39
mveRichard Deeming8-Nov-20 21:39 
GeneralRe: Weird problem with Custom StreamReader with Read override not reading correct number of bytes during base method call Pin
pr1mem0ver16-Nov-20 15:06
pr1mem0ver16-Nov-20 15:06 
QuestionSystem.IO.File.WriteAllLines exception Pin
_Flaviu5-Nov-20 23:52
_Flaviu5-Nov-20 23:52 
I have compiled successfully a C# console project. And when I run this app is stopping at the line:

C#
System.IO.File.WriteAllLines(@destFile, elem);

where @destFile is

C#
string destFile


and elem is

C#
string[] elem = new string[...]


The error is:

System.UnauthorizedAccessException
  HResult=0x80070005
  Message=Access to the path 'e:\' is denied.
  Source=mscorlib
  StackTrace:
   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
   at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
   at System.IO.StreamWriter.CreateFile(String path, Boolean append, Boolean checkHost)
   at System.IO.StreamWriter..ctor(String path, Boolean append, Encoding encoding, Int32 bufferSize, Boolean checkHost)
   at System.IO.StreamWriter..ctor(String path, Boolean append, Encoding encoding)
   at System.IO.File.WriteAllLines(String path, String[] contents)


Of course, I have ran this app as administrator rights, with the same results. What should I understand from this error ? And how can I solve it ? My C# knowledge is thin ...
AnswerRe: System.IO.File.WriteAllLines exception Pin
Richard MacCutchan6-Nov-20 0:01
mveRichard MacCutchan6-Nov-20 0:01 

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.