HELP in VS 2005

Discussion in 'General Computer Support' started by dadon123, Nov 2, 2006.

  1. dadon123

    dadon123

    Joined:
    Nov 2, 2006
    Messages:
    1
    Likes Received:
    0
    Hi people,

    Im trying to copy a file in c# 2.0, but I'm having problem with the filename.

    The following is a piece off code i am using

    string path = @"C:\Documents and Settings\My\My Documents\";
    string path2 = path + @"\hours.doc";

    System.IO.File.Copy(path2, path);

    When I watch the string path, for some strange reason the string path is ""C:\\Documents and Settings\\My\\My Documents\\"".

    I have @ which should prevent this kind of behavior.

    Can any one help please?

    Thanks
     
    dadon123, Nov 2, 2006
    #1
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.