HELP in VS 2005

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

  1. dadon123

    dadon123

    Joined:
    Nov 2, 2006
    Messages:
    1
    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. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. gemeaux | tt

    New Exams for SQL Server 2005 and Visual Studio 2005

    gemeaux | tt, Oct 23, 2004, in forum: Microsoft Certification
    Replies:
    1
    Views:
    604
    Oyvind Mjolund
    Oct 25, 2004
  2. DST
    Replies:
    8
    Views:
    946
    shiv_koirala@yahoo.com
    Oct 28, 2005
  3. Pedro Simoes
    Replies:
    0
    Views:
    577
    Pedro Simoes
    Nov 24, 2005
  4. Pedro Simoes
    Replies:
    0
    Views:
    931
    Pedro Simoes
    Nov 24, 2005
  5. Pedro Simoes
    Replies:
    0
    Views:
    436
    Pedro Simoes
    Nov 24, 2005
Loading...

Share This Page