Skip to content

Commit

Permalink
Simplify RuntimeType.SplitName (dotnet#96991)
Browse files Browse the repository at this point in the history
  • Loading branch information
lilinus authored and tmds committed Jan 23, 2024
1 parent 916388b commit a63903b
Showing 1 changed file with 1 addition and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2046,11 +2046,7 @@ private static void SplitName(string? fullname, out string? name, out string? ns
if (nsDelimiter >= 0)
{
ns = fullname.Substring(0, nsDelimiter);
int nameLength = fullname.Length - ns.Length - 1;
if (nameLength != 0)
name = fullname.Substring(nsDelimiter + 1, nameLength);
else
name = "";
name = fullname.Substring(nsDelimiter + 1);
Debug.Assert(fullname.Equals(ns + "." + name));
}
else
Expand Down

0 comments on commit a63903b

Please sign in to comment.