106 references to string
BasicTestApp (1)
ServerReliability\JSInterop.cs (1)
32return new string(messageChars);
csc (1)
src\Compilers\Core\CommandLine\BuildProtocol.cs (1)
567return new String(reader.ReadChars(length));
dotnet-svcutil-lib (11)
FrameworkFork\Microsoft.CodeDom\Microsoft\CSharpCodeProvider.cs (1)
3843s += new string(results);
FrameworkFork\Microsoft.Xml\Xml\BinaryXml\SqlUtils.cs (1)
563return new String(szResult);
FrameworkFork\Microsoft.Xml\Xml\BinHexDecoder.cs (1)
166throw new XmlException(ResXml.Xml_InvalidBinHexValueOddCount, new string(chars));
FrameworkFork\Microsoft.Xml\Xml\Cache\XPathDocumentBuilder.cs (2)
412WriteString(new string(chars), TextBlockType.Text); 421WriteString(new string(chars), TextBlockType.Text);
FrameworkFork\Microsoft.Xml\Xml\Core\XmlRawWriter.cs (2)
156WriteString(new string(new char[] { ch })); 162WriteString(new string(new char[] { lowChar, highChar }));
FrameworkFork\Microsoft.Xml\Xml\Dom\DocumentXmlWriter.cs (1)
339WriteString(new string(new char[] { highCh, lowCh }));
FrameworkFork\Microsoft.Xml\Xml\XmlException.cs (1)
215aStringList[0] = new string(new char[] { invChar, nextChar });
FrameworkFork\System.Runtime.Serialization\System\Xml\XmlBaseWriter.cs (1)
1114WriteAttributeText(new string(chars));
FrameworkFork\System.Runtime.Serialization\System\Xml\XmlConverter.cs (1)
1164return new string(chars);
Microsoft.Analyzers.Local.Tests (1)
Json\JsonValueTest.cs (1)
334Assert.Equal(new JsonValue("text").GetHashCode(), new JsonValue(new string("text".ToCharArray())).GetHashCode());
Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation (1)
CompilationFailedExceptionFactory.cs (1)
111return new string(contentChars);
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (3)
HttpRequestHeadersTests.cs (3)
540headerValueUtf16Latin1CrossOver = new string(headerValue); 601headerValueUtf16Latin1CrossOver = new string(headerValue); 650string valueString = new string(valueArray);
Microsoft.AspNetCore.Shared.Tests (1)
WebEncodersTests.cs (1)
86var roundTripInput = new string(output);
Microsoft.AspNetCore.StaticFiles.Tests (1)
DefaultContentTypeProviderTests.cs (1)
65Assert.True(provider.TryGetContentType($"{new string(System.IO.Path.GetInvalidPathChars())}.txt", out contentType));
Microsoft.AspNetCore.WebUtilities.Tests (2)
HttpRequestStreamReaderTest.cs (2)
154var valueString = new string(CharData); 176var valueString = new string(CharData);
Microsoft.Build.Engine.UnitTests (3)
CopyOnWriteDictionary_Tests.cs (2)
25string k1 = new string(nameof(Indexer_ReferenceFound).ToCharArray()); // force create new string 56string k1 = new string(nameof(TryGetValue_ReferenceFound).ToCharArray());
Graph\ResultCacheBasedBuilds_Tests.cs (1)
57new string(
Microsoft.Build.Tasks.CodeAnalysis (1)
src\Compilers\Core\CommandLine\BuildProtocol.cs (1)
567return new String(reader.ReadChars(length));
Microsoft.Build.Tasks.Core (2)
GenerateResource.cs (2)
3702throw new TextFileException(_logger.FormatResourceString("GenerateResource.InvalidHexEscapeValue", name.ToString(), new String(hex)), fileName, sr.LineNumber, sr.LinePosition); 3707throw new TextFileException(_logger.FormatResourceString("GenerateResource.InvalidHexEscapeValue", name.ToString(), new String(hex)), fileName, sr.LineNumber, sr.LinePosition);
Microsoft.Build.Utilities.UnitTests (3)
ToolLocationHelper_Tests.cs (3)
1315string targetFrameworkProfile = "PocketPC" + new string(Path.GetInvalidFileNameChars()); 1334string targetFrameworkIdentifier = "Compact Framework" + new string(Path.GetInvalidFileNameChars()); 1590string redistString41 = "<FileList Redist='Random' IncludeFramework='" + new string(invalidFileNameChars) + "'>" +
Microsoft.CodeAnalysis (2)
CodeGen\PrivateImplementationDetails.cs (1)
592return new string(c);
Collections\BitVector.cs (1)
408return new string(value);
Microsoft.CodeAnalysis.CodeStyle (3)
src\Compilers\Core\Portable\Collections\BitVector.cs (1)
408return new string(value);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\NamingStyle.cs (2)
101return new string(chars); 119return new string(chars);
Microsoft.CodeAnalysis.CSharp.CommandLine.UnitTests (1)
CommandLineTests.cs (1)
9254var actual = new string(Encoding.UTF8.GetChars(bytes));
Microsoft.CodeAnalysis.CSharp.Test.Utilities (1)
EmitMetadataTestBase.cs (1)
110var actualPermissionSet = new string(actualPermissionSetBytes.Select(b => (char)b).ToArray());
Microsoft.CodeAnalysis.Features (1)
ExtractMethod\MethodExtractor.cs (1)
254var name = startingWithLetter.Length == 0 ? originalName : new string(startingWithLetter);
Microsoft.CodeAnalysis.Test.Utilities (3)
Win32Res.cs (3)
120return new string(cbuffer).TrimEnd(new char[] { '\0' }); 269return new Tuple<string, string>(new string(key), new string(value));
Microsoft.CodeAnalysis.UnitTests (1)
Text\LargeTextTests.cs (1)
130Assert.Equal(HelloWorld, new string(buffer));
Microsoft.CodeAnalysis.Workspaces (3)
src\Compilers\Core\Portable\Collections\BitVector.cs (1)
408return new string(value);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\NamingStyle.cs (2)
101return new string(chars); 119return new string(chars);
Microsoft.CodeAnalysis.Workspaces.UnitTests (1)
Differencing\LongestCommonSubsequenceTests.cs (1)
72var editedStr = new String(newChars);
Microsoft.DotNet.Helix.Sdk (1)
ProvisioningProfileProvider.cs (1)
44private static readonly Regex s_topLevelAppPattern = new("^[^" + Regex.Escape(new string(Path.GetInvalidFileNameChars())) + "]+\\.app/.+");
Microsoft.DotNet.SignCheckLibrary (1)
Interop\PortableExecutable\ImageSectionHeader.cs (1)
52return new string(Name);
Microsoft.Extensions.Caching.Hybrid.Tests (2)
SizeTests.cs (1)
56string expected = new("simple value".ToArray());
TagSetTests.cs (1)
177return new string(chars);
Microsoft.Extensions.Http.Diagnostics.Tests (1)
Logging\Internal\RandomStringGenerator.cs (1)
17return new string(
Microsoft.Extensions.Telemetry.Tests (2)
Logging\JustInTimeRedactorTests.cs (2)
95value = new string(c); 113value = new string(c);
Microsoft.Maui (1)
Services\Crc64HashAlgorithm.cs (1)
193 return new string(result);
Microsoft.Maui.Controls.SourceGen (1)
src\Core\src\Services\Crc64HashAlgorithm.cs (1)
193 return new string(result);
Microsoft.Maui.Essentials (1)
Types\Shared\WebUtils.shared.cs (1)
66 value = new string(chars);
Microsoft.ML.GenAI.Mistral (1)
MistralCausalLMAgent.cs (1)
163return new string(Enumerable.Repeat(chars, length)
Microsoft.NET.StringTools.net35.UnitTests (2)
SpanBasedStringBuilder_Tests.cs (1)
99internableString = new InternableString(new string(str.ToCharArray()));
WeakStringCache_Tests.cs (1)
110InternableString stringCopy = new InternableString(new string(cachedStrings[i].ToCharArray()));
Microsoft.NET.StringTools.UnitTests (2)
SpanBasedStringBuilder_Tests.cs (1)
99internableString = new InternableString(new string(str.ToCharArray()));
WeakStringCache_Tests.cs (1)
110InternableString stringCopy = new InternableString(new string(cachedStrings[i].ToCharArray()));
PresentationCore (5)
MS\Internal\IListConverters.cs (1)
282return new string(chars);
src\Microsoft.DotNet.Wpf\src\Shared\MS\Win32\WinInet.cs (1)
25CachePath = new string(new char[maxPathSize])
System\Windows\Input\DefaultTextStore.cs (1)
312return new string(text);
System\Windows\Media\Imaging\PropVariant.cs (2)
240pszVal = Marshal.StringToCoTaskMemAnsi(new String(value as char[])); 250strArray[i] = new String(charArray[i] as char[]);
PresentationFramework (9)
System\Windows\Documents\DocumentSequenceTextContainer.cs (1)
688DocumentsTrace.FixedDocumentSequence.TextOM.Trace($"HightlightContent [{new String(sb)}]");
System\Windows\Documents\FixedFindEngine.cs (1)
425unicodeStr = new String(chars);
System\Windows\Documents\ImmComposition.cs (1)
932string compositionString = new string(compositionText);
System\Windows\Documents\Speller.cs (1)
843textMap TextLength = {textMap.TextLength} text = {new string(textMap.Text)}
System\Windows\Documents\TextPointerBase.cs (1)
67return new string(text);
System\windows\Documents\TextSelection.cs (1)
2477fontSignature = new String(new Char[FONTSIGNATURE_SIZE]);
System\Windows\Documents\TextStore.cs (3)
503string filteredText = FilterCompositionString(new string(text), start.GetOffsetToPosition(end)); // does NOT filter MaxLength. 704string filteredText = FilterCompositionString(new string(text), range.Start.GetOffsetToPosition(range.End)); // does NOT filter MaxLength. 2937return new string(text);
Replay (1)
src\Compilers\Core\CommandLine\BuildProtocol.cs (1)
567return new String(reader.ReadChars(length));
Roslyn.Diagnostics.CSharp.Analyzers (1)
NumberCommentsRefactoring.cs (1)
117=> new(self.Where(c => !char.IsWhiteSpace(c)).ToArray());
System.CodeDom (2)
Microsoft\CSharp\CSharpCodeGenerator.cs (1)
2868s += new string(results);
Microsoft\VisualBasic\VBCodeGenerator.cs (1)
783s = new string(results) + s;
System.Data.Common (5)
System\Data\Common\SQLConvert.cs (3)
471return new string((char[])value); 665return new string(((SqlChars)value).Value); 721return new string((char[])value);
System\Data\SQLTypes\SQLChars.cs (1)
399return IsNull ? SqlString.Null : new string(Value);
System\Data\SQLTypes\SQLDecimal.cs (1)
989return new string(szResult);
System.Data.Odbc (1)
System\Data\Odbc\OdbcParameter.cs (1)
1015value = new string((char[])value);
System.Private.CoreLib (3)
src\libraries\System.Private.CoreLib\src\System\Resources\ResourceReader.cs (1)
413s = new string(arr);
src\libraries\System.Private.CoreLib\src\System\Text\Encoding.cs (1)
1011new string(GetChars(bytes, index, count));
src\libraries\System.Private.CoreLib\src\System\Text\StringBuilder.Debug.cs (1)
34chunks[i - 1] = new string(current.m_ChunkChars).Replace('\0', '.');
System.Private.Xml (3)
System\Xml\Xsl\Runtime\XsltFunctions.cs (1)
476return new string(text);
System\Xml\Xsl\Xslt\XsltQilFactory.cs (2)
145String(format.InfinitySymbol), String(format.NanSymbol), String(new string(format.Characters)) 158String(format.InfinitySymbol), String(format.NanSymbol), String(new string(format.Characters))
System.Resources.Extensions (1)
src\libraries\System.Private.CoreLib\src\System\Resources\ResourceReader.cs (1)
413s = new string(arr);
System.Security.Cryptography.Xml (1)
System\Security\Cryptography\Xml\Utils.cs (1)
155return new string(rgbOut);
System.Text.Json.SourceGeneration (1)
src\libraries\System.Text.Json\Common\JsonCamelCaseNamingPolicy.cs (1)
24return new string(chars);
System.Text.RegularExpressions (1)
System\Text\RegularExpressions\RegexCompiler.cs (1)
1305Ldstr(new string(literalChars));
System.Text.RegularExpressions.Generator (3)
RegexGenerator.Emitter.cs (3)
475fieldName = GetSHA256FieldName("s_nonAscii_", new string(chars)); 494string setLiteral = Literal(new string(chars)); 1372target.Literal.Chars is not null ? $"one of the characters {Literal(new string(target.Literal.Chars))}" :
System.Windows.Forms (2)
System\Windows\Forms\ActiveX\AxHost.State.cs (1)
238LicenseKey = new string(binaryReader.ReadChars(cc));
System\Windows\Forms\Controls\UpDown\DomainUpDown.cs (1)
347int matchIndex = MatchIndex(new string(character), false, _domainIndex + 1);
System.Windows.Forms.UI.IntegrationTests (2)
Infra\DataCollectionService.cs (2)
234string sanitizedTestName = new(testName.Select(c => char.IsLetterOrDigit(c) ? c : '_').ToArray()); 235string sanitizedErrorId = new(errorId.Select(c => char.IsLetterOrDigit(c) ? c : '_').ToArray());
vbc (1)
src\Compilers\Core\CommandLine\BuildProtocol.cs (1)
567return new String(reader.ReadChars(length));
VBCSCompiler (1)
src\Compilers\Core\CommandLine\BuildProtocol.cs (1)
567return new String(reader.ReadChars(length));
xunit.console (1)
ConsoleRunner.cs (1)
61if (!defaultDirectory.EndsWith(new string(new[] { Path.DirectorySeparatorChar }), StringComparison.Ordinal))