[Mono-list] C# builder with Mono
David Curylo
curylod at asme.org
Wed Apr 27 18:39:39 UTC 2016
This isn’t something the C# language supports.
https://msdn.microsoft.com/en-us/library/0feaad6z.aspx <https://msdn.microsoft.com/en-us/library/0feaad6z.aspx>
The C# #define does not allow a symbol to be given a value, as in languages such as C++. For example, #define cannot be used to create a macro or to define a constant. If you need to define a constant, use an enum variable. If you want to create a C++ style macro, consider alternatives such as generics. Since macros are notoriously error-prone, C# disallows their use but provides safer alternatives.
> On Apr 25, 2016, at 11:21 AM, Namestnik <fileismore at gmail.com> wrote:
>
> I just started learning c #
> I want to pass a variable in the program code when compiling ..
> I would like to do without the resource file, if possible.
>
> In the program code there is an array:
> string [] conf = { "str1", "str2", "str3", "str4", "str5"};
>
>
> I would like to compile redefine its contents
>
> That is, once the compiler to specify the data to in the compiled exe was
> the actual array
>
>
>
> --
> View this message in context: http://mono.1490590.n4.nabble.com/C-builder-with-Mono-tp4667757.html
> Sent from the Mono - General mailing list archive at Nabble.com.
> _______________________________________________
> Mono-list maillist - Mono-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-list
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ximian.com/pipermail/mono-list/attachments/20160427/7bd2d1bf/attachment.html>
More information about the Mono-list
mailing list