ApplicationData.MachinePath Property

Definition

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

String

Platform::String

winrt::hstring

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.

Applies to