directory.getfile and windows phone 7

In WP7 application, I am trying to get the name of all the images in the Finiti folder.

However the string[] txtfiles is always empty (null).

I think it is because I am writing a wrong link to the folder.

public MainPage()
{
    InitializeComponent();
    string[] txtfiles = Directory.GetFiles(@"c://Finiti");//, "*.jpg");
    MessageBox.Show(txtfiles[0]);
}

Answers

You are using a string literal and an escape character, you only need one, not both.

Try using either

Directory.GetFiles(@"c:/Finiti");

or

Directory.GetFiles("c://Finiti");

Otherwise the path will be interpretted as C://Finiti which isn’t valid on Windows.