❔ Do not know why this does not work
Going trough a 2 yeat old online C# course and do not know what is up with this.
26 Replies
TheRanger
REPL Result: Failure
Exception: FormatException
Compile: 317.823ms | Execution: 27.416ms | React with ❌ to remove this embed.
well, we commonly use string interpolation anyway
TheRanger
REPL Result: Success
Console Output
Compile: 520.146ms | Execution: 74.863ms | React with ❌ to remove this embed.
i see ur issue anyway
you wrote O not 0
how did i do is string interpolation anyways?
heres an example
TheRanger
REPL Result: Success
Console Output
Compile: 628.601ms | Execution: 73.520ms | React with ❌ to remove this embed.
basically it converts the variable in between {} into its value
you'd need to put $ before the first quotation of the string in order to activate it, just like in the example
and what is the difrence between
that and
It's shorter and can be used anywhere in any string
$interpolation
String interpolation is the preferred way of building strings in C#. It is easier to read than concatenation.
For example:
can be written as:
👍
and more readable
Also more performant actually
how do you use the modx bot
$eval
To compile C# code in Discord, use
!eval
Example:
Please don't try breaking the REPL service. Also, remember to do so in #bot-spam!!e also works
!e
read the example
u need to provide code
ohh
and can you see the output anyvere
what do you mean?
like start that code and see the output here
it outputs at where you executed the code
so if you ran your code here, it will output here
if your trying to display the output into a different server, i dont think it will work
Was this issue resolved? If so, run
/close
- otherwise I will mark this as stale and this post will be archived until there is new activity.