#define xxxx in C# code
Frank Romeni
In Coresuite Curstomize / Extended Code I use C# extensively.Now I tried to use #define xxxx of the C# preprocessor (in combination with #if #endif which are of no problem to use, e.g. #if DEBUG ... #endif works pretty good).
A syntax error message says, that #define can only be used at the beginning of a codefile, before any other token is used in the file.
This error appears because even if I write #define in the first line in the extended code module of Coresuite Cstomize it is not the first line of the resulting sourcefile to compile, since Coresuite Customize mounts the code of its different modules into one large sourcefile.
A solution to this would be to set #define as an option to the C# compiler. Is this somehow possible (e.g. an init-file of the compiler etc.)?
Or is there some other way to use #define?
Thank you!
Frank Romei
Michael Egloff
Hi Frank,thank you for this input. As you already mentioned coresuite customize is merging this code parts to one.
For better use in the code we added some basic imports (such as using SwissAddonFramework.UI.Components).
This statements are put at first place.
Therefore it's not possible to write the #define statement at the beginning of the file.
We will check this issue for a further release.
I'll let you knwo as soon as we decided.
Regards,
Michael
Frank Romeni
Hallo Michael Egloff,vielen Dank für die Antwort.
Ich warte also ab, bis eine Stellungnahme von Euch kommt.
Bis dahin lasse meine Meldung als unbeantwortet stehen.
Gruß
Frank Romeni
Frank Romeni
Hallo Michael,jetzt ist ja wieder fast ein halbes Jahr ins Land gezogen. Hat sich zu meiner #define-Anfrage inzwischen irgendetwas getan?
Ich rbeite z.Z. noch mit dem Framework Version 2.44 und Coresuite Customize Version 1.46.
Gruß
Frank R.
0
Please sign in to leave a comment.
Comments
0 comments