We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
format!()
1 parent 39b5e93 commit 8d8e9abCopy full SHA for 8d8e9ab
src/language/strings.md
@@ -116,6 +116,9 @@ let age = 42;
116
let str = format!("Person {{ name: {name}, age: {age} }}");
117
```
118
119
+Note that `format!` only supports embedding variable names in the string; more complex
120
+expressions are spelled like `format!("1 + 1 = {}", 1 + 1)`.
121
+
122
Custom classes and structs can also be interpolated in C# due to the fact that
123
the `ToString()` method is available for each type as it inherits from `object`.
124
0 commit comments