Home > Net >  C # newbie question, do you have a similar this kind of writing...
C # newbie question, do you have a similar this kind of writing...

Time:12-29

Before in python, there is a very good grammar, as follows:

OS. The system (" the adb - {} s install {} ". The format (" adb123 ", "com. XXX. Apk"))

Have their own syntax in c #, roughly is {0}, {1} this way, then try to:

The method name ({0} "the adb - s install {1}", "adb123", "com. XXX. Apk"), ineffective and error

Excuse me, have similar wording, c # can be clear at a glance I want to enter the command

Newbie question, everyone laughed

CodePudding user response:

Console. WriteLine this is the built-in system, this is not, what I said is write their own way, how can like python, clearly want to enter the command line

CodePudding user response:

The role of "$" sign in c #, and usage

CodePudding user response:

The string. Format ({0} "the adb - s install {1}", "adb123", "com. XXX. Apk")

CodePudding user response:

Var age=23;
Var name="zhangsan"
Console. WriteLine ($name: "{name}, age: {age}");
//output "name: zhangsan, age: 23"
  •  Tags:  
  • C#
  • Related