Click here to Skip to main content
15,910,303 members
Home / Discussions / C#
   

C#

 
AnswerRe: Debug Statements - writing to the console and files [modified] Pin
Paul Conrad18-Nov-08 4:54
professionalPaul Conrad18-Nov-08 4:54 
GeneralRe: Debug Statements - writing to the console and files Pin
Dave Kreskowiak18-Nov-08 8:10
mveDave Kreskowiak18-Nov-08 8:10 
GeneralRe: Debug Statements - writing to the console and files Pin
Paul Conrad18-Nov-08 8:39
professionalPaul Conrad18-Nov-08 8:39 
GeneralRe: Debug Statements - writing to the console and files Pin
stormydaniels18-Nov-08 5:24
stormydaniels18-Nov-08 5:24 
QuestionDirectory.GetLastWriteTime(fpath) overwrites the path string Pin
beriho18-Nov-08 4:05
beriho18-Nov-08 4:05 
AnswerRe: Directory.GetLastWriteTime(fpath) overwrites the path string Pin
Ennis Ray Lynch, Jr.18-Nov-08 4:09
Ennis Ray Lynch, Jr.18-Nov-08 4:09 
GeneralRe: Directory.GetLastWriteTime(fpath) overwrites the path string Pin
beriho18-Nov-08 4:13
beriho18-Nov-08 4:13 
AnswerRe: Directory.GetLastWriteTime(fpath) overwrites the path string Pin
Guffa18-Nov-08 4:12
Guffa18-Nov-08 4:12 
beriho wrote:
string[] fileDatesList = fileNames; // create fileDateList and initialze(not relevant with what


This is your problem. You think that declaring a variable that is a reference to a string array does also create an array of strings, but it doesn't. You end up with two references to the same array of strings. Anything that you do to the array through one of the references is what you see when you access the array through the other reference.

You have to create a new array, so that you have two separate arrays:

string[] fileDatesList = new string[fileNames.Length];

Despite everything, the person most likely to be fooling you next is yourself.

GeneralRe: Directory.GetLastWriteTime(fpath) overwrites the path string Pin
beriho18-Nov-08 5:03
beriho18-Nov-08 5:03 
QuestionLearning C# by example? Complete projects? Pin
Dougmeister18-Nov-08 3:04
Dougmeister18-Nov-08 3:04 
AnswerRe: Learning C# by example? Complete projects? Pin
Alan Balkany18-Nov-08 3:27
Alan Balkany18-Nov-08 3:27 
AnswerRe: Learning C# by example? Complete projects? Pin
#realJSOP18-Nov-08 3:44
professional#realJSOP18-Nov-08 3:44 
GeneralRe: Learning C# by example? Complete projects? Pin
Dougmeister18-Nov-08 3:51
Dougmeister18-Nov-08 3:51 
GeneralRe: Learning C# by example? Complete projects? Pin
stormydaniels18-Nov-08 4:11
stormydaniels18-Nov-08 4:11 
GeneralRe: Learning C# by example? Complete projects? [modified] Pin
Guffa18-Nov-08 4:19
Guffa18-Nov-08 4:19 
GeneralRe: Learning C# by example? Complete projects? Pin
#realJSOP18-Nov-08 4:31
professional#realJSOP18-Nov-08 4:31 
GeneralRe: Learning C# by example? Complete projects? Pin
stormydaniels18-Nov-08 5:22
stormydaniels18-Nov-08 5:22 
GeneralRe: Learning C# by example? Complete projects? Pin
Dougmeister19-Nov-08 2:07
Dougmeister19-Nov-08 2:07 
AnswerRe: Learning C# by example? Complete projects? Pin
Priya Prk18-Nov-08 9:47
Priya Prk18-Nov-08 9:47 
Questionscreensaver Pin
jugal_piet@indiatimes.com18-Nov-08 2:13
jugal_piet@indiatimes.com18-Nov-08 2:13 
AnswerRe: screensaver Pin
SeMartens18-Nov-08 2:18
SeMartens18-Nov-08 2:18 
JokeRe: screensaver Pin
Giorgi Dalakishvili18-Nov-08 2:28
mentorGiorgi Dalakishvili18-Nov-08 2:28 
AnswerRe: screensaver Pin
sph3rex18-Nov-08 2:28
sph3rex18-Nov-08 2:28 
AnswerRe: screensaver Pin
#realJSOP18-Nov-08 3:47
professional#realJSOP18-Nov-08 3:47 
AnswerRe: screensaver Pin
DaveyM6918-Nov-08 3:53
professionalDaveyM6918-Nov-08 3:53 

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.