Legend

Class
Struct
Enum
Interface
Delegate
Constructor
Method
Property
Event
Field

Method: string GetFileName()

Declaration

public string GetFileName()

Summary

Returns the full path and file name that should be used to store the settings class marked with this attribute. Note that the return value may change depending on external factors (see remarks). The recommended approach is to load settings once, and then save them whenever necessary to whichever path is returned by this function.

Remarks

This method checks if a file by the name (AppName).IsPortable.txt exists in the application path. If that file exists, the settings are always stored in that application path. This check is skipped if there is no entry assembly (Assembly.GetEntryAssembly is null).