Skip to content

Commit 3e5f870

Browse files
Remove remaining libraries references to string.Copy (#31706)
1 parent 2ddc9d2 commit 3e5f870

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/libraries/System.Data.Common/src/System/Data/SQLTypes/SQLString.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ public SqlString(string data, int lcid, SqlCompareOptions compareOptions)
174174
else
175175
{
176176
m_fNotNull = true;
177-
m_value = data; // PERF: do not String.Copy
177+
m_value = data;
178178
}
179179
}
180180

src/libraries/System.Management/src/System/Management/WMIGenerator.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4727,7 +4727,7 @@ private static string ConvertValuesToName(string str)
47274727
bool bAdd = true;
47284728
if (str.Length == 0)
47294729
{
4730-
return string.Copy("");
4730+
return string.Empty;
47314731
}
47324732

47334733
char[] arrString = str.ToCharArray();

0 commit comments

Comments
 (0)