Module.Name: Avoid unnecessary char[] allocation (dotnet/coreclr#6865)
authorJustin Van Patten <jvp@justinvp.com>
Wed, 24 Aug 2016 03:21:45 +0000 (20:21 -0700)
committerJan Kotas <jkotas@microsoft.com>
Wed, 24 Aug 2016 03:21:45 +0000 (20:21 -0700)
commitbf80a9007264a576a131715816d8ba1594f39742
tree7322d81866d18428a832272f6e228cd02007d335
parenta6c5320e08b49eb5f9772af8f2f00d30c8a21820
Module.Name: Avoid unnecessary char[] allocation (dotnet/coreclr#6865)

Instead of `new string(s.ToCharArray(), i + 1, s.Length - i - 1)`, use
the simpler `string.Substring(i + 1)` to avoid the unnecessary
intermediate char[] allocation.

Commit migrated from https://github.com/dotnet/coreclr/commit/cacf46feb64583d1e774a2a3c9c12da1120effa7
src/coreclr/src/mscorlib/src/System/Reflection/Module.cs