diff --git a/src/ComputeSharp.SourceGeneration/Helpers/IndentedTextWriter.cs b/src/ComputeSharp.SourceGeneration/Helpers/IndentedTextWriter.cs index 37c51870..e9b26bf9 100644 --- a/src/ComputeSharp.SourceGeneration/Helpers/IndentedTextWriter.cs +++ b/src/ComputeSharp.SourceGeneration/Helpers/IndentedTextWriter.cs @@ -4,6 +4,7 @@ using System; using System.ComponentModel; +using System.Globalization; using System.Runtime.CompilerServices; using System.Text; @@ -342,7 +343,7 @@ internal sealed class IndentedTextWriter : IDisposable { if (value is IFormattable) { - this.writer.Write(((IFormattable)value).ToString(format)); + this.writer.Write(((IFormattable)value).ToString(format, CultureInfo.InvariantCulture)); } else if (value is not null) {