Article Details
Id: | 20561 |
Product: | finPOWER Connect |
Type: | FIX |
Version: | 4.00.03 |
Opened: | 09/08/2023 |
Closed: | 10/08/2023 |
Released: | 27/09/2023 |
Job: | J031764 |
![]() |
Scripting; C#; Script does not compile if if includes "#reference" directive or "using" statements
C# (C sharp) Scripts that included either a "#reference" directive or a "using" statement failed to compile.
Compile errors may include the following (or similar):
- Preprocessor directive expected
- Single-line comment or end-of-line expected
- Invalid token "using" in class, struct, or interface member declaration
- Invalid token ";" in class, struct, or interface member declaration
For example, the following Script code would not compile:
#reference "System.Core"
using System.Linq;
public bool Main(ISKeyValueList parameters) {
// Assume Success
bool Success = true;
// Function should return a Boolean value indicating success
return Success;
}
NOTE: LINQ support does not require any references or imports from version 4.00.03