Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 12 additions & 11 deletions snippets/csharp/System/DateTime/ToString/ToString4.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
using System;
// <Snippet3>
using System;
using System.Globalization;

public class ToStringExample3
{
public static void Main()
{
// <Snippet3>
CultureInfo[] cultures = [
CultureInfo.InvariantCulture,
new CultureInfo("en-us"),
Expand All @@ -20,21 +20,22 @@ public static void Main()
foreach (CultureInfo culture in cultures)
{
string cultureName;

if (string.IsNullOrEmpty(culture.Name))
cultureName = culture.NativeName;
else
cultureName = culture.Name;

Console.WriteLine($"In {cultureName}, {thisDate.ToString(culture)}");
}

// The example produces the following output:
// In Invariant Language (Invariant Country), 05/01/2009 09:00:00
// In en-US, 5/1/2009 9:00:00 AM
// In fr-FR, 01/05/2009 09:00:00
// In de-DE, 01.05.2009 09:00:00
// In es-ES, 01/05/2009 9:00:00
// In ja-JP, 2009/05/01 9:00:00
// </Snippet3>
}
}

// The example produces the following output:
// In Invariant Language (Invariant Country), 05/01/2009 09:00:00
// In en-US, 5/1/2009 9:00:00 AM
// In fr-FR, 01/05/2009 09:00:00
// In de-DE, 01.05.2009 09:00:00
// In es-ES, 01/05/2009 9:00:00
// In ja-JP, 2009/05/01 9:00:00
// </Snippet3>
3 changes: 3 additions & 0 deletions xml/System.CodeDom.Compiler/IndentedTextWriter.xml
Original file line number Diff line number Diff line change
Expand Up @@ -350,6 +350,7 @@
<summary>Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources asynchronously.</summary>
<returns>A <see cref="T:System.Threading.Tasks.ValueTask" /> representing the asynchronous dispose operation.</returns>
<remarks>To be added.</remarks>
<inheritdoc />
</Docs>
</Member>
<Member MemberName="Encoding">
Expand Down Expand Up @@ -486,6 +487,7 @@
<summary>Clears all buffers for this <see cref="T:System.CodeDom.Compiler.IndentedTextWriter" /> asynchronously and causes any buffered data to be written to the underlying device.</summary>
<returns>A <see cref="T:System.Threading.Tasks.Task" /> representing the asynchronous flush operation.</returns>
<remarks>This method stores in the task it returns all non-usage exceptions that the method's synchronous counterpart can throw. If an exception is stored into the returned task, that exception will be thrown when the task is awaited. Usage exceptions, such as <see cref="T:System.ArgumentException" />, are still thrown synchronously. For the stored exceptions, see the exceptions thrown by <see cref="M:System.CodeDom.Compiler.IndentedTextWriter.Flush" />.</remarks>
<inheritdoc />
</Docs>
</Member>
<Member MemberName="FlushAsync">
Expand Down Expand Up @@ -2682,6 +2684,7 @@
<summary>Asynchronously writes the line terminator to the underlying <see cref="T:System.IO.TextWriter" />.</summary>
<returns>A <see cref="T:System.Threading.Tasks.Task" /> representing the asynchronous line writing operation.</returns>
<remarks>This method stores in the task it returns all non-usage exceptions that the method's synchronous counterpart can throw. If an exception is stored into the returned task, that exception will be thrown when the task is awaited. Usage exceptions, such as <see cref="T:System.ArgumentException" />, are still thrown synchronously. For the stored exceptions, see the exceptions thrown by <see cref="M:System.CodeDom.Compiler.IndentedTextWriter.WriteLine" />.</remarks>
<inheritdoc />
</Docs>
</Member>
<Member MemberName="WriteLineAsync">
Expand Down
12 changes: 8 additions & 4 deletions xml/System.Collections.Generic/CollectionExtensions.xml
Original file line number Diff line number Diff line change
Expand Up @@ -179,11 +179,15 @@
<Parameter Name="set" Type="System.Collections.Generic.ISet&lt;T&gt;" Index="0" FrameworkAlternate="net-10.0" RefType="this" />
</Parameters>
<Docs>
<typeparam name="T">To be added.</typeparam>
<param name="set">To be added.</param>
<summary>To be added.</summary>
<returns>To be added.</returns>
<typeparam name="T">The type of elements in the set.</typeparam>
<param name="set">The set to wrap.</param>
<summary>
<para>Returns a read-only <see cref="T:System.Collections.ObjectModel.ReadOnlySet`1" /> wrapper for the specified set.</para>
</summary>
<returns>An object that acts as a read-only wrapper around the current <see cref="T:System.Collections.Generic.ISet`1" />.</returns>
<remarks>To be added.</remarks>
<exception cref="T:System.ArgumentNullException">
<paramref name="set" /> is <see langword="null" />.</exception>
</Docs>
</Member>
<Member MemberName="AsReadOnly&lt;TKey,TValue&gt;">
Expand Down
1 change: 1 addition & 0 deletions xml/System.Collections.Generic/Queue`1.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1200,6 +1200,7 @@
]]></format>
</remarks>
<altmember cref="P:System.Collections.ICollection.SyncRoot" />
<inheritdoc cref="P:System.Collections.ICollection.IsSynchronized" />
</Docs>
</Member>
<Member MemberName="System.Collections.ICollection.SyncRoot">
Expand Down
24 changes: 15 additions & 9 deletions xml/System.Collections.ObjectModel/ReadOnlyCollection.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
</Attribute>
</Attributes>
<Docs>
<summary>To be added.</summary>
<summary>Provides static methods for read-only collections.</summary>
<remarks>To be added.</remarks>
</Docs>
<Members>
Expand Down Expand Up @@ -68,10 +68,13 @@
</Parameter>
</Parameters>
<Docs>
<typeparam name="T">To be added.</typeparam>
<param name="values">To be added.</param>
<summary>To be added.</summary>
<returns>To be added.</returns>
<typeparam name="T">The type of elements in the collection.</typeparam>
<param name="values">The span of values to include in the collection.</param>
<summary>
<para>Creates a new <see cref="T:System.Collections.ObjectModel.ReadOnlyCollection`1" /> from the specified span of values.</para>
<para>This method (simplifies collection initialization)[https://learn.microsoft.com/dotnet/csharp/language-reference/operators/collection-expressions] to create a new <see cref="T:System.Collections.ObjectModel.ReadOnlyCollection`1" /> with the specified values.</para>
</summary>
<returns>A new <see cref="T:System.Collections.ObjectModel.ReadOnlyCollection`1" /> containing the specified values.</returns>
<remarks>To be added.</remarks>
</Docs>
</Member>
Expand Down Expand Up @@ -119,10 +122,13 @@
</Parameter>
</Parameters>
<Docs>
<typeparam name="T">To be added.</typeparam>
<param name="values">To be added.</param>
<summary>To be added.</summary>
<returns>To be added.</returns>
<typeparam name="T">The type of elements in the collection.</typeparam>
<param name="values">The span of values to include in the collection.</param>
<summary>
<para>Creates a new <see cref="T:System.Collections.ObjectModel.ReadOnlySet`1" /> from the specified span of values.</para>
<para>This method (simplifies collection initialization)[https://learn.microsoft.com/dotnet/csharp/language-reference/operators/collection-expressions] to create a new <see cref="T:System.Collections.ObjectModel.ReadOnlySet`1" /> with the specified values.</para>
</summary>
<returns>A new <see cref="T:System.Collections.ObjectModel.ReadOnlySet`1" /> containing the specified values.</returns>
<remarks>To be added.</remarks>
</Docs>
</Member>
Expand Down
5 changes: 5 additions & 0 deletions xml/System.Collections.ObjectModel/ReadOnlySet`1.xml
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@
<returns>
<see langword="true" /> if <paramref name="item" /> is found in the <see cref="T:System.Collections.Generic.ICollection`1" />; otherwise, <see langword="false" />.</returns>
<remarks>To be added.</remarks>
<inheritdoc />
</Docs>
</Member>
<Member MemberName="Count">
Expand Down Expand Up @@ -790,6 +791,7 @@
<param name="index">The zero-based index in <paramref name="array" /> at which copying begins.</param>
<summary>Copies the elements of the <see cref="T:System.Collections.ICollection" /> to an <see cref="T:System.Array" />, starting at a particular <see cref="T:System.Array" /> index.</summary>
<remarks>To be added.</remarks>
<inheritdoc />
</Docs>
</Member>
<Member MemberName="System.Collections.ICollection.IsSynchronized">
Expand Down Expand Up @@ -819,6 +821,7 @@
<value>
<see langword="true" /> if access to the <see cref="T:System.Collections.ICollection" /> is synchronized (thread safe); otherwise, <see langword="false" />.</value>
<remarks>This member is an explicit interface member implementation. It can be used only when the &lt;xref:System.Collections.ObjectModel.ReadOnlySet`1&gt; instance is cast to an &lt;xref:System.Collections.ICollection&gt; interface.</remarks>
<inheritdoc />
</Docs>
</Member>
<Member MemberName="System.Collections.ICollection.SyncRoot">
Expand Down Expand Up @@ -847,6 +850,7 @@
<summary>Gets an object that can be used to synchronize access to the <see cref="T:System.Collections.ICollection" />.</summary>
<value>An object that can be used to synchronize access to the <see cref="T:System.Collections.ICollection" />.</value>
<remarks>This member is an explicit interface member implementation. It can be used only when the &lt;xref:System.Collections.ObjectModel.ReadOnlySet`1&gt; instance is cast to an &lt;xref:System.Collections.ICollection&gt; interface.</remarks>
<inheritdoc />
</Docs>
</Member>
<Member MemberName="System.Collections.IEnumerable.GetEnumerator">
Expand Down Expand Up @@ -876,6 +880,7 @@
<summary>Returns an enumerator that iterates through a collection.</summary>
<returns>An <see cref="T:System.Collections.IEnumerator" /> object that can be used to iterate through the collection.</returns>
<remarks>This member is an explicit interface member implementation. It can be used only when the &lt;xref:System.Collections.ObjectModel.ReadOnlySet`1&gt; instance is cast to an &lt;xref:System.Collections.IEnumerable&gt; interface.</remarks>
<inheritdoc />
</Docs>
</Member>
</Members>
Expand Down
1 change: 1 addition & 0 deletions xml/System.Collections/BitArray.xml
Original file line number Diff line number Diff line change
Expand Up @@ -639,6 +639,7 @@
The number of elements in the source <see cref="T:System.Collections.BitArray" /> is greater than the available space from <paramref name="index" /> to the end of the destination <paramref name="array" />.</exception>
<exception cref="T:System.InvalidCastException">The type of the source <see cref="T:System.Collections.BitArray" /> cannot be cast automatically to the type of the destination <paramref name="array" />.</exception>
<altmember cref="T:System.Array" />
<inheritdoc />
</Docs>
</Member>
<Member MemberName="Count">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
</ReturnValue>
<MemberValue>1064967</MemberValue>
<Docs>
<summary>To be added.</summary>
<summary>Specifies all constructors, including those inherited from base classes.</summary>
</Docs>
</Member>
<Member MemberName="AllEvents">
Expand All @@ -98,7 +98,7 @@
</ReturnValue>
<MemberValue>530432</MemberValue>
<Docs>
<summary>To be added.</summary>
<summary>Specifies all events, including those inherited from base classes.</summary>
</Docs>
</Member>
<Member MemberName="AllFields">
Expand All @@ -118,7 +118,7 @@
</ReturnValue>
<MemberValue>65632</MemberValue>
<Docs>
<summary>To be added.</summary>
<summary>Specifies all fields, including those inherited from base classes.</summary>
</Docs>
</Member>
<Member MemberName="AllMethods">
Expand All @@ -138,7 +138,7 @@
</ReturnValue>
<MemberValue>32792</MemberValue>
<Docs>
<summary>To be added.</summary>
<summary>Specifies all methods, including those inherited from base classes.</summary>
</Docs>
</Member>
<Member MemberName="AllNestedTypes">
Expand All @@ -158,7 +158,7 @@
</ReturnValue>
<MemberValue>2228608</MemberValue>
<Docs>
<summary>To be added.</summary>
<summary>Specifies all nested types, including those inherited from base classes.</summary>
</Docs>
</Member>
<Member MemberName="AllProperties">
Expand All @@ -178,7 +178,7 @@
</ReturnValue>
<MemberValue>263680</MemberValue>
<Docs>
<summary>To be added.</summary>
<summary>Specifies all properties, including those inherited from base classes.</summary>
</Docs>
</Member>
<Member MemberName="Interfaces">
Expand Down Expand Up @@ -274,7 +274,7 @@
</ReturnValue>
<MemberValue>16388</MemberValue>
<Docs>
<summary>To be added.</summary>
<summary>Specifies all non-public constructors, including those inherited from base classes.</summary>
</Docs>
</Member>
<Member MemberName="NonPublicEvents">
Expand Down Expand Up @@ -320,7 +320,7 @@
</ReturnValue>
<MemberValue>528384</MemberValue>
<Docs>
<summary>To be added.</summary>
<summary>Specifies all non-public events, including those inherited from base classes.</summary>
</Docs>
</Member>
<Member MemberName="NonPublicFields">
Expand Down Expand Up @@ -366,7 +366,7 @@
</ReturnValue>
<MemberValue>65600</MemberValue>
<Docs>
<summary>To be added.</summary>
<summary>Specifies all non-public fields, including those inherited from base classes.</summary>
</Docs>
</Member>
<Member MemberName="NonPublicMethods">
Expand Down Expand Up @@ -412,7 +412,7 @@
</ReturnValue>
<MemberValue>32784</MemberValue>
<Docs>
<summary>To be added.</summary>
<summary>Specifies all non-public methods, including those inherited from base classes.</summary>
</Docs>
</Member>
<Member MemberName="NonPublicNestedTypes">
Expand Down Expand Up @@ -458,7 +458,7 @@
</ReturnValue>
<MemberValue>131328</MemberValue>
<Docs>
<summary>To be added.</summary>
<summary>Specifies all non-public nested types, including those inherited from base classes.</summary>
</Docs>
</Member>
<Member MemberName="NonPublicProperties">
Expand Down Expand Up @@ -504,7 +504,7 @@
</ReturnValue>
<MemberValue>263168</MemberValue>
<Docs>
<summary>To be added.</summary>
<summary>Specifies all non-public properties, including those inherited from base classes.</summary>
</Docs>
</Member>
<Member MemberName="PublicConstructors">
Expand Down Expand Up @@ -550,7 +550,7 @@
</ReturnValue>
<MemberValue>1048579</MemberValue>
<Docs>
<summary>To be added.</summary>
<summary>Specifies all public constructors, including those inherited from base classes.</summary>
</Docs>
</Member>
<Member MemberName="PublicEvents">
Expand Down Expand Up @@ -674,7 +674,7 @@
</ReturnValue>
<MemberValue>2097280</MemberValue>
<Docs>
<summary>To be added.</summary>
<summary>Specifies all public nested types, including those inherited from base classes.</summary>
</Docs>
</Member>
<Member MemberName="PublicParameterlessConstructor">
Expand Down
6 changes: 3 additions & 3 deletions xml/System.Diagnostics.CodeAnalysis/ExperimentalAttribute.xml
Original file line number Diff line number Diff line change
Expand Up @@ -116,9 +116,9 @@ the warnings or errors, if needed.
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Docs>
<summary>To be added.</summary>
<value>To be added.</value>
<remarks>To be added.</remarks>
<summary>Gets or sets an optional message associated with the experimental attribute.</summary>
<value>The message that provides additional information about the experimental feature.</value>
<remarks>This message can be used to provide more context or guidance about the experimental feature.</remarks>
</Docs>
</Member>
<Member MemberName="UrlFormat">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ For more information, see [Introduction to AOT warnings](/dotnet/core/deploying/
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Docs>
<summary>To be added.</summary>
<summary>Gets or sets a value that indicates whether the annotation should apply to static members.</summary>
<value>To be added.</value>
<remarks>To be added.</remarks>
</Docs>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ This attribute allows tools to understand which methods are unsafe to call when
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Docs>
<summary>To be added.</summary>
<summary>Gets or sets a value that indicates whether the annotation should apply to static members.</summary>
<value>To be added.</value>
<remarks>To be added.</remarks>
</Docs>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
</ReturnValue>
<MemberValue>1</MemberValue>
<Docs>
<summary>This is a trusting domain or forest. The other domain or forest has access to the resources of this domain or forest. This domain or forest does not have access to resources that belong to the other domain or forest.</summary>
<summary>A trusting domain or forest. An inbound (or incoming) trust is where some other domain or forest trusts this domain or forest. This domain or forest does not have access to resources that belong to the other domain or forest.</summary>
</Docs>
</Member>
<Member MemberName="Outbound">
Expand All @@ -98,7 +98,7 @@
</ReturnValue>
<MemberValue>2</MemberValue>
<Docs>
<summary>This is a trusted domain or forest. This domain or forest has access to resources of the other domain or forest. The other domain or forest does not have access to the resources of this domain or forest.</summary>
<summary>A trusted domain or forest. An outbound (or outgoing) trust is where this domain or forest trusts some other domain or forest. The other domain or forest does not have access to the resources of this domain or forest.</summary>
</Docs>
</Member>
</Members>
Expand Down
6 changes: 5 additions & 1 deletion xml/System.Globalization/CompareOptions.xml
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,11 @@ The following code example shows how sorting with StringSort differs from sortin
</ReturnValue>
<MemberValue>32</MemberValue>
<Docs>
<summary>To be added.</summary>
<summary>
<para>The option that specifies that string comparisons sort sequences of digits (Unicode general category "Nd") based on their numeric value.</para>
<para>For example, "2" comes before "10". Non-digit characters such as decimal points, minus, and plus signs</para>
<para>are not considered as part of the sequence and will terminate it. This flag is not valid for indexing methods (such as <see cref="M:System.Globalization.CompareInfo.IndexOf(System.String,System.String,System.Globalization.CompareOptions)" /> and <see cref="M:System.Globalization.CompareInfo.IsPrefix(System.String,System.String,System.Globalization.CompareOptions)" />).</para>
</summary>
</Docs>
</Member>
<Member MemberName="Ordinal">
Expand Down
Loading
Loading