cs-script Unexpected character “$”
up vote
0
down vote
favorite
Use cs-script in a console app with
dynamic script = CSScript.LoadCode(
@"using System;
public class Script
{
public void SayHello(string name)
{
Console.WriteLine($""Hello: {name}!"");
}
}")
.CreateObject("*");
script.SayHello("World");
Unexpected character "$" exception throwed.
But the following code do well.
dynamic script = CSScript.Evaluator.LoadCode(
@"using System;
public class Script
{
public void SayHello(string name)
{
Console.WriteLine($""Hello: {name}!"");
}
}");
script.SayHello("World");
And i hnow CSScript.Evaluator is more solwer.How can i use the syntax sugar faster?
cs-script
add a comment |
up vote
0
down vote
favorite
Use cs-script in a console app with
dynamic script = CSScript.LoadCode(
@"using System;
public class Script
{
public void SayHello(string name)
{
Console.WriteLine($""Hello: {name}!"");
}
}")
.CreateObject("*");
script.SayHello("World");
Unexpected character "$" exception throwed.
But the following code do well.
dynamic script = CSScript.Evaluator.LoadCode(
@"using System;
public class Script
{
public void SayHello(string name)
{
Console.WriteLine($""Hello: {name}!"");
}
}");
script.SayHello("World");
And i hnow CSScript.Evaluator is more solwer.How can i use the syntax sugar faster?
cs-script
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
Use cs-script in a console app with
dynamic script = CSScript.LoadCode(
@"using System;
public class Script
{
public void SayHello(string name)
{
Console.WriteLine($""Hello: {name}!"");
}
}")
.CreateObject("*");
script.SayHello("World");
Unexpected character "$" exception throwed.
But the following code do well.
dynamic script = CSScript.Evaluator.LoadCode(
@"using System;
public class Script
{
public void SayHello(string name)
{
Console.WriteLine($""Hello: {name}!"");
}
}");
script.SayHello("World");
And i hnow CSScript.Evaluator is more solwer.How can i use the syntax sugar faster?
cs-script
Use cs-script in a console app with
dynamic script = CSScript.LoadCode(
@"using System;
public class Script
{
public void SayHello(string name)
{
Console.WriteLine($""Hello: {name}!"");
}
}")
.CreateObject("*");
script.SayHello("World");
Unexpected character "$" exception throwed.
But the following code do well.
dynamic script = CSScript.Evaluator.LoadCode(
@"using System;
public class Script
{
public void SayHello(string name)
{
Console.WriteLine($""Hello: {name}!"");
}
}");
script.SayHello("World");
And i hnow CSScript.Evaluator is more solwer.How can i use the syntax sugar faster?
cs-script
cs-script
asked Nov 21 at 3:39
zhusp
54
54
add a comment |
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53404938%2fcs-script-unexpected-character%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown