+ 1
Wat does this mean.
the app is trying to tell me how this works but I dont understand what the curly brackets are trying to do? static void Main(string[] args) { int x = 10; double y = 20; Console.WriteLine("x = {0}; y = {1}", x, y); } // Output: x = 10; y = 20
3 Antworten
+ 2
Console.WriteLine ("{0}, {1}", x, y);
Here, the {0} and {1} are placeholders, allowing you to put different data types in a string, similar to
cout << "x = "<<x << " and y = " << y;
in cpp
+ 1
oh.. I see. thank you very much!