Short answer: C# has no String.ToLowerOrdinal() method. The name appears in some lists because “ordinal” is a common word in .NET string options (StringComparison.Ordinal, StringComparison.OrdinalIgnoreCase), but there is no lowercase method with that name.
What people usually want is one of two things. (1) A lowercase copy that is the same on every machine: use ToLowerInvariant(). (2) A comparison that ignores case without culture surprises: use StringComparison.OrdinalIgnoreCase, which does not create any new string at all.
Not a real member.System.String has noToLowerOrdinal() method in any .NET version. Writing text.ToLowerOrdinal() does not compile; you get error CS1061 (“'string' does not contain a definition for 'ToLowerOrdinal'”). Everything on this page uses real, built-in alternatives. Whichever you pick, strings stay immutable: you get a new string or a bool, and the original text never changes.
Syntax
No built-in method — use these instead. Each line below compiles and runs.
C#
string text = "ABC-Def";
// text.ToLowerOrdinal(); // error CS1061: no such method
string lower = text.ToLowerInvariant(); // "abc-def"
bool same = string.Equals(text, "abc-def", StringComparison.OrdinalIgnoreCase); // True
char c = char.ToLowerInvariant('Q'); // 'q'
Use this instead
When to use it
text.ToLowerInvariant()
You need a lowercase copy that is identical on every computer.
You need a case-insensitive prefix, suffix, or search check.
char.ToLowerInvariant(c)
You lowercase one character at a time.
“Ordinal” in .NET means “compare by character code numbers”. OrdinalIgnoreCase compares codes after folding letters to one case using invariant rules. In .NET 8 and later, System.Text.Ascii also offers span-based lowercase helpers for pure ASCII data, but for everyday code ToLowerInvariant() is the simple choice.
Real declarations of the alternatives
C#
// System.String
public string ToLowerInvariant();
public string ToLower(CultureInfo? culture);
public static bool Equals(string? a, string? b, StringComparison comparisonType);
// System.Char
public static char ToLowerInvariant(char c);
Parameters
Parameter
Description
None
There is no ToLowerOrdinal(), so there are no parameters. ToLowerInvariant() also takes none.
comparisonType
For string.Equals, StartsWith, EndsWith, and IndexOf: pass StringComparison.OrdinalIgnoreCase.
Return Value
Return Value
Description
string (ToLowerInvariant)
A new lowercase copy using invariant rules.
bool (Equals with OrdinalIgnoreCase)
Whether the two strings match when case is ignored. No new strings are created.
C# Examples
Example 1 — The Real Way to Get a Culture-Safe Lowercase Copy
Use ToLowerInvariant() where you might have expected a ToLowerOrdinal().
C#
using System;
class Program {
static void Main() {
string code = "ABC-Def";
string lower = code.ToLowerInvariant();
Console.WriteLine(lower);
Console.WriteLine(code);
}
}
Output
abc-def
ABC-Def
How It Works
The missing method.code.ToLowerOrdinal() would not compile, so this program uses the closest real method.
Fixed lowercase rules.ToLowerInvariant() lowers every letter using the invariant culture; the dash is kept.
Identical everywhere. The output does not depend on the computer's language, which is usually what “ordinal” is meant to suggest.
A new string.code still prints ABC-Def.
Example 2 — Compare Without Case, No Copy Needed
If you wanted to lowercase only to compare, skip the copy and pass OrdinalIgnoreCase.
C#
using System;
class Program {
static void Main() {
string file = "Report.PDF";
Console.WriteLine(file.Equals("report.pdf"));
Console.WriteLine(string.Equals(file, "report.pdf", StringComparison.OrdinalIgnoreCase));
Console.WriteLine(file.EndsWith(".pdf", StringComparison.OrdinalIgnoreCase));
}
}
Output
False
True
True
How It Works
Exact by default.Equals without options compares every character code, so the capital letters make it False.
Ordinal, ignoring case. The static string.Equals with OrdinalIgnoreCase treats R/r and PDF/pdf as equal.
Works for suffixes too.EndsWith accepts the same option, so a file-type check needs no lowercase copy.
Cheaper than lowercasing. No temporary strings are created, which matters inside big loops.
Example 3 — Lowercase Character by Character
Lower each char yourself with char.ToLowerInvariant and confirm it matches the string method.
C#
using System;
class Program {
static void Main() {
string s = "MiXeD";
char[] chars = s.ToCharArray();
for (int i = 0; i < chars.Length; i++) {
chars[i] = char.ToLowerInvariant(chars[i]);
}
string result = new string(chars);
Console.WriteLine(result);
Console.WriteLine(result == s.ToLowerInvariant());
}
}
Output
mixed
True
How It Works
Copy to an array. A string cannot be edited, but the char[] from ToCharArray() can.
One letter at a time.char.ToLowerInvariant is a real static method on System.Char that lowers a single character with invariant rules.
Back to a string.new string(chars) builds mixed from the edited array.
Same as the built-in. The comparison prints True, so for whole strings simply call ToLowerInvariant(). The loop is useful when you only lower some characters.
Frequently Asked Questions
No. There is no ToLowerOrdinal method on System.String in any .NET version, and calling it gives compiler error CS1061. Use ToLowerInvariant() for a lowercase copy, or StringComparison.OrdinalIgnoreCase for case-insensitive comparisons.
For a lowercase copy that is the same on every machine, use text.ToLowerInvariant(). To compare without case, use string.Equals(a, b, StringComparison.OrdinalIgnoreCase).
Ordinal means characters are compared by their numeric UTF-16 codes, without culture rules. StringComparison.Ordinal is exact; OrdinalIgnoreCase also ignores letter case.
It does not create new strings, it is fast, and it gives the same answer on every machine. a.ToLower() == b.ToLower() can fail under some cultures, such as Turkish.
You can write an extension method with that name, but it would be your own code, not part of .NET. Usually it would just call ToLowerInvariant(), so it is simpler to call that directly.