Skip to content

Commit a77c0b4

Browse files
authored
Simplify RuntimeType.SplitName (#96991)
1 parent ce3e773 commit a77c0b4

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

src/coreclr/System.Private.CoreLib/src/System/RuntimeType.CoreCLR.cs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2046,11 +2046,7 @@ private static void SplitName(string? fullname, out string? name, out string? ns
20462046
if (nsDelimiter >= 0)
20472047
{
20482048
ns = fullname.Substring(0, nsDelimiter);
2049-
int nameLength = fullname.Length - ns.Length - 1;
2050-
if (nameLength != 0)
2051-
name = fullname.Substring(nsDelimiter + 1, nameLength);
2052-
else
2053-
name = "";
2049+
name = fullname.Substring(nsDelimiter + 1);
20542050
Debug.Assert(fullname.Equals(ns + "." + name));
20552051
}
20562052
else

0 commit comments

Comments
 (0)