- Manuale introduttivo
- Utilizzo del software
- OPC UA
- Oggetti grafici e di layout
- Sessioni e impostazioni locali
- Sviluppo di soluzioni
- Sviluppo di progetti con C#
- NetLogic
- Metodi ed eventi in C#
- Riferimento API C#
- Esempi di applicazione
- Esercitazione dell'interfaccia utente
- Esercitazione sui collegamenti dinamici
- Esercitazione sui logger
- Esercitazione sugli allarmi
- Esercitazione sulle NetLogic
- Riferimento su oggetti e variabili
ResourceURI.FromProjectRelativePath(path)
Returns a C# object of the
ResourceURI
type, with the URIType
of ProjectRelative
and that contains a relative path to a file than the ProjectFiles
folder.static ResourceUri FromProjectRelativePath(stringpath);
Arguments
- path(string)
- A relative path of a file in relation to theProjectFilesfolder.
Returns
- ResourceURI
- A C# object that contains the path indicated in the argument.
Example
The following example shows an API that returns a C#
projectRelativeResourceURI
object of the ResourceURI
type that contains the relative path Text1.txt
. The object is used as an argument of the .NET WriteAllText
API to create a Text1.txt
text file inside the ProjectFiles
folder.
var projectRelativeResourceUri = ResourceUri.FromProjectRelativePath("Text1.txt"); Log.Info(projectRelativeResourceUri.ProjectRelativePath); File.WriteAllText(projectRelativeResourceUri.Uri, "Hello world!");
Fornire un feedback