Error:
'FileProtect.FileUrl._url' is inaccessible due to its protection level
Getting the above error for some reason, all i'm trying to do is put a collection of objects in a List...
public void load()
{
string test = "C:\\Users\\Martyn Ball\\Desktop\\";
string[] filePaths = Directory.GetFiles(@test);
foreach (string tmp in filePaths)
{
//Add file url to custom object
FileUrl fileInfo = new FileUrl();
fileInfo.url = tmp;
//Is it file/folder
//Add to list
currentFolder.Add(fileInfo);
}
}
Here is the class:
public class FileUrl
{
string url { get; set; }
int filefolder { get; set; }
}