Both the following code create errors in the MultiChart .Net Function that I am using:
Code: Select all
env_string = Environment.SpecialFolder.ApplicationData;
Code: Select all
env_string = Environment.ExpandEnvironmentVariables("%appdata%");
'PowerLanguage.IApplicationInfo' does not contain a definition for 'SpecialFolder' and no extension method 'SpecialFolder' accepting a first argument of type 'PowerLanguage.IApplicationInfo' could be found (are you missing a using directive or an assembly reference?) "Test" [Function] Ln 136
Why do I get this error that there is no ExpandEnvironmentVariables?'PowerLanguage.IApplicationInfo' does not contain a definition for 'ExpandEnvironmentVariables' and no extension method 'ExpandEnvironmentVariables' accepting a first argument of type 'PowerLanguage.IApplicationInfo' could be found (are you missing a using directive or an assembly reference?) "Test" [Function] Ln 136
The Environment class should be available when "using System;" which I already declared at the beginning of my code as described here:
And the intellisense in the PowerEditor shows these Environment methods.
Thank you.