Reputation: 70234
In one of our components ported from Java to C#, we used FileInfo
as an equivalent for Java's File
class.
Now we're working towards making that class library available to Metro applications and we have to pass the certification obviously.
What's a good replacement for FileInfo
in .NET Framework 4.5 core profile?
Upvotes: 3
Views: 2564
Reputation: 1
in order to target both win8 platform and silverlight. that is for metro apps and non metro apps in your case just create a shared file project and put in #if conditions. so that it targets for both the platform. have a look in the following link for creating the same
http://www.dotnetjalps.com/2015/02/shared-project-visual-studio-2015.html
Upvotes: 0
Reputation: 217351
The StorageFile Class in the Windows.Storage Namespace.
StorageFile class
Represents a file. Provides information about the file and its content, and ways to manipulate them.
Example:
var file = await StorageFile.GetFileFromPathAsync(path);
Upvotes: 4