ApplicationData.MachinePath Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
A value that represents the path for the machine data store.
public:
property Platform::String ^ MachinePath { Platform::String ^ get(); };
winrt::hstring MachinePath();
public string MachinePath { get; }
var string = applicationData.machinePath;
Public ReadOnly Property MachinePath As String
Property Value
Returns the path for the machine data store.
Examples
The following example shows how to save data to the machine data store:
void SaveData(string data)
{
var applicationData = ApplicationData.GetDefault();
var filename = Path.Combine(applicationData.MachinePath, "applicationdata.dat");
File.WriteAllText(filename, data, System.Text.UTF8Encoding);
}
Remarks
This location is per-machine, not per-user like the other Path properties. An empty string is returned if machine data store is not supported.