diff --git a/dotnet/src/Plugins/Plugins.Core/TextPlugin.cs b/dotnet/src/Plugins/Plugins.Core/TextPlugin.cs
index c145a7e8bfa9..842099709fc3 100644
--- a/dotnet/src/Plugins/Plugins.Core/TextPlugin.cs
+++ b/dotnet/src/Plugins/Plugins.Core/TextPlugin.cs
@@ -41,7 +41,8 @@ public sealed class TextPlugin
/// An object that supplies culture-specific casing rules.
/// The converted string.
[KernelFunction, Description("Convert a string to uppercase.")]
- public string Uppercase(string input, CultureInfo? cultureInfo = null) => input.ToUpper(cultureInfo);
+ public string Uppercase(string input, CultureInfo? cultureInfo = null) =>
+ input.ToUpper(cultureInfo ?? CultureInfo.CurrentCulture);
///
/// Convert a string to lowercase.
@@ -50,7 +51,8 @@ public sealed class TextPlugin
/// An object that supplies culture-specific casing rules.
/// The converted string.
[KernelFunction, Description("Convert a string to lowercase.")]
- public string Lowercase(string input, CultureInfo? cultureInfo = null) => input.ToLower(cultureInfo);
+ public string Lowercase(string input, CultureInfo? cultureInfo = null) =>
+ input.ToLower(cultureInfo ?? CultureInfo.CurrentCulture);
///
/// Get the length of a string. Returns 0 if null or empty