Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions docs/fsharp/language-reference/interpolated-strings.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
title: Interpolated strings
description: Learn about interpolated strings, a special form of string that allows you to embed F# expressions directly inside them.
ms.date: 10/01/2025
ai-usage: ai-assisted
---

# Interpolated strings
Expand Down Expand Up @@ -33,6 +34,9 @@ printfn $"I think {3.0 + 0.14} is close to {System.Math.PI}!"

The contents in between each `{}` brace pair can be any F# expression.

For non-typed interpolated strings (without format specifiers), the expression is converted to a string using the `ToString()` method. If the expression evaluates to `null`, an empty string is used.

For typed interpolated strings with format specifiers (such as `%s{expr}` or `%d{expr}`), the conversion follows the rules defined for that specific format specifier.
To escape a `{}` brace pair, write two of them like so:

```fsharp
Expand Down