c# - Confusion over relative and absolute paths -


i have wpf program deals images on canvas.

i @ stage trying use serialization able save contents of program , reload @ later stage.

so @ moment when inserting images control using absolute path values, understand bad idea program wanting save state of program , reload @ later time.

so best course of action take in situation.

do create folder inside wpf project example called images , copy images use in program folder , point path this?

or on wrong lines here?

if serializing state data of application, create folder in 1 or more of so-called system special folders, can call environment.getfolderpath.

you may example store data application scope (same users) in folder below special folder specified specialfolder.commonapplicationdata enum (which c:\programdata on windows 7 systems).

data specific current roaming user (who works on multiple computers on network), stored in folder below specialfolder.applicationdata. there specialfolder.localapplicationdata non-roaming user.

you may take @ environment.specialfolder enumeration overview.


Comments

Popular posts from this blog

curl - PHP fsockopen help required -

HTTP/1.0 407 Proxy Authentication Required PHP -

c# - Resource not found error -