I cant get access to "DriveInfo". I added "Using System.IO;"
Do you have any clue why I cant get access to "DriveInfo"
public long GetTotalFreeSpace(string driveName)
{
foreach (DriveInfo drive in DriveInfo.GetDrives())
{
if (drive.IsReady && drive.Name == driveName)
{
return label.TotalFreeSpace;
}
}
return -1;
}
Loading
VulpesPosted Aug 14, 2011, 4:34 AM
http://www.codeproject.com/KB/silverlight/FileExplorerInSilverlight.aspx
VulpesPosted Aug 16, 2011, 5:06 AM
David SmithPosted Aug 16, 2011, 12:20 AM
VulpesPosted Aug 15, 2011, 11:27 AM
David SmithPosted Aug 14, 2011, 9:37 PM
VulpesPosted Aug 14, 2011, 5:05 PM
David SmithPosted Aug 14, 2011, 4:39 PM
I rebooted my computer and for some reason it just work. Its weird. lol. Let me troubleshoot somemore. How do you turn off RIA services. For some reason if i got asp.net default form as a start up project. It will not work. But if i am running RIA services it works fine.
The error i am getting is this operation is not supported in the current context
VulpesPosted Aug 14, 2011, 7:34 AM
To use 'dynamic' you need .NET 4.0 which I assume you're using.
To use the AutomationFactory class, you need this using directive in your program:
using System.Runtime.InteropServices.Automation;
David SmithPosted Aug 14, 2011, 7:22 AM
I can't get pass this line for some reason below within my project. When I run the project from codeproject it passes the line.
dynamic fileSystem = AutomationFactory.CreateObject("Scripting.FileSystemObject");