144 references to string
BasicTestApp (1)
ServerReliability\JSInterop.cs (1)
32return new string(messageChars);
csc (1)
src\Compilers\Shared\BuildProtocol.cs (1)
569return 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);
GenerateDocumentationAndConfigFiles (3)
src\Compilers\Core\Portable\Collections\BitVector.cs (1)
408return new string(value);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\NamingStyle.cs (2)
102return new string(chars); 120return new string(chars);
Metrics (4)
src\Compilers\Core\Portable\Collections\BitVector.cs (1)
408return new string(value);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\NamingStyle.cs (2)
102return new string(chars); 120return new string(chars);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\NamingStylePreferencesEditorConfigSerializer.cs (1)
155return new string([.. name
Metrics.Legacy (4)
src\Compilers\Core\Portable\Collections\BitVector.cs (1)
408return new string(value);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\NamingStyle.cs (2)
102return new string(chars); 120return new string(chars);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\NamingStylePreferencesEditorConfigSerializer.cs (1)
155return new string([.. name
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.Tasks.CodeAnalysis (1)
src\Compilers\Shared\BuildProtocol.cs (1)
569return new String(reader.ReadChars(length));
Microsoft.Build.Tasks.CodeAnalysis.Sdk (1)
src\Compilers\Shared\BuildProtocol.cs (1)
569return new String(reader.ReadChars(length));
Microsoft.CodeAnalysis (2)
CodeGen\PrivateImplementationDetails.cs (1)
592return new string(c);
Collections\BitVector.cs (1)
408return new string(value);
Microsoft.CodeAnalysis.Analyzers (4)
src\Compilers\Core\Portable\Collections\BitVector.cs (1)
408return new string(value);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\NamingStyle.cs (2)
102return new string(chars); 120return new string(chars);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\NamingStylePreferencesEditorConfigSerializer.cs (1)
155return new string([.. name
Microsoft.CodeAnalysis.AnalyzerUtilities (4)
src\Compilers\Core\Portable\Collections\BitVector.cs (1)
408return new string(value);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\NamingStyle.cs (2)
102return new string(chars); 120return new string(chars);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\NamingStylePreferencesEditorConfigSerializer.cs (1)
155return new string([.. name
Microsoft.CodeAnalysis.BannedApiAnalyzers (4)
src\Compilers\Core\Portable\Collections\BitVector.cs (1)
408return new string(value);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\NamingStyle.cs (2)
102return new string(chars); 120return new string(chars);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\NamingStylePreferencesEditorConfigSerializer.cs (1)
155return new string([.. name
Microsoft.CodeAnalysis.CodeStyle (4)
src\Compilers\Core\Portable\Collections\BitVector.cs (1)
408return new string(value);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\NamingStyle.cs (2)
102return new string(chars); 120return new string(chars);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\NamingStylePreferencesEditorConfigSerializer.cs (1)
155return new string([.. name
Microsoft.CodeAnalysis.CSharp.CommandLine.UnitTests (1)
CommandLineTests.cs (1)
9243var 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.EditorFeatures.UnitTests (1)
EmbeddedLanguages\StackFrame\StackFrameParserTests.Utilities.cs (1)
127var enumeratedString = new string([.. enumeratedParsedCharacters.Select(ch => (char)ch.Value)]);
Microsoft.CodeAnalysis.Features (1)
ExtractMethod\MethodExtractor.cs (1)
254var name = startingWithLetter.Length == 0 ? originalName : new string(startingWithLetter);
Microsoft.CodeAnalysis.PerformanceSensitiveAnalyzers (4)
src\Compilers\Core\Portable\Collections\BitVector.cs (1)
408return new string(value);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\NamingStyle.cs (2)
102return new string(chars); 120return new string(chars);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\NamingStylePreferencesEditorConfigSerializer.cs (1)
155return new string([.. name
Microsoft.CodeAnalysis.PublicApiAnalyzers (4)
src\Compilers\Core\Portable\Collections\BitVector.cs (1)
408return new string(value);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\NamingStyle.cs (2)
102return new string(chars); 120return new string(chars);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\NamingStylePreferencesEditorConfigSerializer.cs (1)
155return new string([.. name
Microsoft.CodeAnalysis.ResxSourceGenerator (4)
src\Compilers\Core\Portable\Collections\BitVector.cs (1)
408return new string(value);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\NamingStyle.cs (2)
102return new string(chars); 120return new string(chars);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\NamingStylePreferencesEditorConfigSerializer.cs (1)
155return new string([.. name
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)
102return new string(chars); 120return 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.AI.Abstractions (1)
Utilities\AIJsonUtilities.cs (1)
162return new string(chars);
Microsoft.Extensions.Caching.Hybrid.Tests (1)
SizeTests.cs (1)
56string expected = new("simple value".ToArray());
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)
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\Shared\BuildProtocol.cs (1)
569return new String(reader.ReadChars(length));
Roslyn.Diagnostics.Analyzers (4)
src\Compilers\Core\Portable\Collections\BitVector.cs (1)
408return new string(value);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\NamingStyle.cs (2)
102return new string(chars); 120return new string(chars);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\NamingStylePreferencesEditorConfigSerializer.cs (1)
155return new string([.. name
Roslyn.Diagnostics.CSharp.Analyzers (1)
NumberCommentsRefactoring.cs (1)
126=> 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 (4)
src\libraries\System.Private.CoreLib\src\System\Resources\ResourceReader.cs (1)
413s = new string(arr);
src\libraries\System.Private.CoreLib\src\System\SearchValues\SearchValues.T.cs (1)
59"\"" + new string(Unsafe.As<T[], char[]>(ref values)) + "\"" :
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)
227string sanitizedTestName = new(testName.Select(c => char.IsLetterOrDigit(c) ? c : '_').ToArray()); 228string sanitizedErrorId = new(errorId.Select(c => char.IsLetterOrDigit(c) ? c : '_').ToArray());
Test.Utilities (3)
src\Compilers\Core\Portable\Collections\BitVector.cs (1)
408return new string(value);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\NamingStyle.cs (2)
102return new string(chars); 120return new string(chars);
Text.Analyzers (4)
src\Compilers\Core\Portable\Collections\BitVector.cs (1)
408return new string(value);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\NamingStyle.cs (2)
102return new string(chars); 120return new string(chars);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\NamingStyles\Serialization\NamingStylePreferencesEditorConfigSerializer.cs (1)
155return new string([.. name
vbc (1)
src\Compilers\Shared\BuildProtocol.cs (1)
569return new String(reader.ReadChars(length));
VBCSCompiler (1)
src\Compilers\Shared\BuildProtocol.cs (1)
569return new String(reader.ReadChars(length));
xunit.console (1)
ConsoleRunner.cs (1)
61if (!defaultDirectory.EndsWith(new string(new[] { Path.DirectorySeparatorChar }), StringComparison.Ordinal))