Home > Net >  Console. Writeline (${} {} ");
Console. Writeline (${} {} ");

Time:09-21

Console. Writeline (${} {} "); How can you say the words,,,,

CodePudding user response:

The efficacy and the string. Format as

In addition. You hair problem 0. So nobody answer

CodePudding user response:

Const string myName="Benjamin";
WriteLine ($" Hello {name}!" );
After add $, the output will be the name for expression, seeks after the expression value output

CodePudding user response:

using the static System. The Console;

Const string name="Benjamin";
WriteLine ($" Hello {name}!" );

After add $, the output will be the name for expression, seeks after the expression value output
The above statements output is:
Hello Benjamin!

If not add $, then the output is:
Hello {name}!

CodePudding user response:

The
refer to the original poster qq_36847070 response:
console. Writeline (${} {} "); How can you say the words,,,,


Equivalent to the Console. WriteLine (" {0} {1} ", p1, p2);

CodePudding user response:

Console. Writeline (${} {} ");
The building Lord, this compilation is not through

CodePudding user response:

WriteLine (${STH} ");//this case, the compiler will take STH as an expression, calculate the value of the expression, and then the output,

CodePudding user response:

refer to 6th floor ice stains clown orange response:
WriteLine (${STH} ");//this case, the compiler will take STH as an expression, calculate the value of the expression, and then the output,

Is this statement which version of the.net can use of, or I use the wrong way, I use. Red net4.6.1 writing this statement he emblem cannot compile

CodePudding user response:

young programmers reference 7 floor small don's reply:
Quote: refer to the sixth floor ice stains clown orange response:

WriteLine (${STH} ");//this case, the compiler will take STH as an expression, calculate the value of the expression, and then the output,

Is this statement which version of the.net can use of, or I use the wrong way, I use. Red net4.6.1 writing this statement he emblem cannot compile

Should be my VS2013 does not support

CodePudding user response:

young programmers reference 7 floor small don's reply:
Quote: refer to the sixth floor ice stains clown orange response:

WriteLine (${STH} ");//this case, the compiler will take STH as an expression, calculate the value of the expression, and then the output,

Is this statement which version of the.net can use of, or I use the wrong way, I use. Red net4.6.1 writing this statement he emblem cannot compile


The vs2017 can
  •  Tags:  
  • C#
  • Related