diff --git a/src/libraries/System.Collections.Specialized/src/System/Collections/Specialized/ListDictionary.cs b/src/libraries/System.Collections.Specialized/src/System/Collections/Specialized/ListDictionary.cs
index 540985d1196cd..760831ebd8e94 100644
--- a/src/libraries/System.Collections.Specialized/src/System/Collections/Specialized/ListDictionary.cs
+++ b/src/libraries/System.Collections.Specialized/src/System/Collections/Specialized/ListDictionary.cs
@@ -5,13 +5,10 @@
namespace System.Collections.Specialized
{
- ///
- ///
- /// This is a simple implementation of IDictionary using a singly linked list. This
- /// will be smaller and faster than a Hashtable if the number of elements is 10 or less.
- /// This should not be used if performance is important for large numbers of elements.
- ///
- ///
+ ///
+ /// Implements using a singly linked list.
+ /// Recommended for collections that typically include fewer than 10 items.
+ ///
[Serializable]
[System.Runtime.CompilerServices.TypeForwardedFrom("System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
public class ListDictionary : IDictionary
diff --git a/src/libraries/System.Private.CoreLib/src/Internal/AssemblyAttributes.cs b/src/libraries/System.Private.CoreLib/src/Internal/AssemblyAttributes.cs
index 3c0b9479941ce..2d36d0fbbc330 100644
--- a/src/libraries/System.Private.CoreLib/src/Internal/AssemblyAttributes.cs
+++ b/src/libraries/System.Private.CoreLib/src/Internal/AssemblyAttributes.cs
@@ -1,15 +1,6 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
-/*============================================================
-**
-** This file exists to contain miscellaneous module-level attributes
-** and other miscellaneous stuff.
-**
-**
-**
-===========================================================*/
-
using System;
using System.Reflection;
using System.Runtime.InteropServices;
diff --git a/src/libraries/System.Private.CoreLib/src/System/AccessViolationException.cs b/src/libraries/System.Private.CoreLib/src/System/AccessViolationException.cs
index fbecb11272f51..32b5064d0ddef 100644
--- a/src/libraries/System.Private.CoreLib/src/System/AccessViolationException.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/AccessViolationException.cs
@@ -1,21 +1,15 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
-/*=============================================================================
-**
-**
-**
-** Purpose: Exception class representing an AV that was deemed unsafe and may have corrupted the application.
-**
-**
-=============================================================================*/
-
using System.ComponentModel;
using System.Runtime.CompilerServices;
using System.Runtime.Serialization;
namespace System
{
+ ///
+ /// The exception that is thrown when there is an attempt to read or write protected memory.
+ ///
[Serializable]
[TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
public class AccessViolationException : SystemException
diff --git a/src/libraries/System.Private.CoreLib/src/System/ApplicationException.cs b/src/libraries/System.Private.CoreLib/src/System/ApplicationException.cs
index d0d7d8c81ad37..40752739be271 100644
--- a/src/libraries/System.Private.CoreLib/src/System/ApplicationException.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/ApplicationException.cs
@@ -1,28 +1,20 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
-/*=============================================================================
-**
-**
-**
-** Purpose: The base class for all "less serious" exceptions that must be
-** declared or caught.
-**
-**
-=============================================================================*/
-
using System.ComponentModel;
using System.Runtime.CompilerServices;
using System.Runtime.Serialization;
namespace System
{
- // The ApplicationException is the base class for nonfatal,
- // application errors that occur. These exceptions are generated
- // (i.e., thrown) by an application, not the Runtime. Applications that need
- // to create their own exceptions do so by extending this class.
- // ApplicationException extends but adds no new functionality to
- // RecoverableException.
+ ///
+ /// Serves as the base class for application-defined exceptions.
+ ///
+ ///
+ /// You should derive custom exceptions from the class rather than the class.
+ /// You should not throw an in your code, and you should not catch an
+ /// unless you intend to re-throw the original exception.
+ ///
[Serializable]
[TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
public class ApplicationException : Exception
diff --git a/src/libraries/System.Private.CoreLib/src/System/ArgumentException.cs b/src/libraries/System.Private.CoreLib/src/System/ArgumentException.cs
index a46db753d8ca1..677cc36debf41 100644
--- a/src/libraries/System.Private.CoreLib/src/System/ArgumentException.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/ArgumentException.cs
@@ -1,15 +1,6 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
-/*=============================================================================
-**
-**
-**
-** Purpose: Exception class for invalid arguments to a method.
-**
-**
-=============================================================================*/
-
using System.ComponentModel;
using System.Diagnostics.CodeAnalysis;
using System.Runtime.CompilerServices;
@@ -17,9 +8,9 @@
namespace System
{
- // The ArgumentException is thrown when an argument does not meet
- // the contract of the method. Ideally it should give a meaningful error
- // message describing what was wrong and which parameter is incorrect.
+ ///
+ /// The exception that is thrown when one of the arguments provided to a method is not valid.
+ ///
[Serializable]
[TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
public class ArgumentException : SystemException
diff --git a/src/libraries/System.Private.CoreLib/src/System/ArgumentNullException.cs b/src/libraries/System.Private.CoreLib/src/System/ArgumentNullException.cs
index 0b0977f977e26..ec4281c9373ff 100644
--- a/src/libraries/System.Private.CoreLib/src/System/ArgumentNullException.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/ArgumentNullException.cs
@@ -1,15 +1,6 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
-/*=============================================================================
-**
-**
-**
-** Purpose: Exception class for null arguments to a method.
-**
-**
-=============================================================================*/
-
using System.ComponentModel;
using System.Diagnostics.CodeAnalysis;
using System.Runtime.CompilerServices;
@@ -17,8 +8,9 @@
namespace System
{
- // The ArgumentException is thrown when an argument
- // is null when it shouldn't be.
+ ///
+ /// The exception that is thrown when a reference ( in Visual Basic) is passed to a method that does not accept it as a valid argument.
+ ///
[Serializable]
[TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
public class ArgumentNullException : ArgumentException
diff --git a/src/libraries/System.Private.CoreLib/src/System/ArgumentOutOfRangeException.cs b/src/libraries/System.Private.CoreLib/src/System/ArgumentOutOfRangeException.cs
index 48c941f6d6a64..97cf6349b26b8 100644
--- a/src/libraries/System.Private.CoreLib/src/System/ArgumentOutOfRangeException.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/ArgumentOutOfRangeException.cs
@@ -1,15 +1,6 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
-/*=============================================================================
-**
-**
-**
-** Purpose: Exception class for method arguments outside of the legal range.
-**
-**
-=============================================================================*/
-
using System.ComponentModel;
using System.Runtime.Serialization;
using System.Runtime.CompilerServices;
@@ -19,8 +10,9 @@
namespace System
{
- // The ArgumentOutOfRangeException is thrown when an argument
- // is outside the legal range for that argument.
+ ///
+ /// The exception that is thrown when the value of an argument is outside the allowable range of values as defined by the invoked method.
+ ///
[Serializable]
[TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
public class ArgumentOutOfRangeException : ArgumentException
diff --git a/src/libraries/System.Private.CoreLib/src/System/ArithmeticException.cs b/src/libraries/System.Private.CoreLib/src/System/ArithmeticException.cs
index 923f16fd63dc6..510a0c412ea10 100644
--- a/src/libraries/System.Private.CoreLib/src/System/ArithmeticException.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/ArithmeticException.cs
@@ -1,23 +1,15 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
-/*=============================================================================
-**
-**
-**
-** Purpose: Exception class for bad arithmetic conditions!
-**
-**
-=============================================================================*/
-
using System.ComponentModel;
using System.Runtime.CompilerServices;
using System.Runtime.Serialization;
namespace System
{
- // The ArithmeticException is thrown when overflow or underflow
- // occurs.
+ ///
+ /// The exception that is thrown for errors in an arithmetic, casting, or conversion operation.
+ ///
[Serializable]
[TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
public class ArithmeticException : SystemException
diff --git a/src/libraries/System.Private.CoreLib/src/System/ArraySegment.cs b/src/libraries/System.Private.CoreLib/src/System/ArraySegment.cs
index bbd18b6b0814c..e4ec370796bf6 100644
--- a/src/libraries/System.Private.CoreLib/src/System/ArraySegment.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/ArraySegment.cs
@@ -1,17 +1,6 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
-/*============================================================
-**
-**
-**
-** Purpose: Convenient wrapper for an array, an offset, and
-** a count. Ideally used in streams & collections.
-** Net Classes will consume an array of these.
-**
-**
-===========================================================*/
-
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
@@ -20,6 +9,9 @@
namespace System
{
+ ///
+ /// Delimits a section of a one-dimensional array.
+ ///
// Note: users should make sure they copy the fields out of an ArraySegment onto their stack
// then validate that the fields describe valid bounds within the array. This must be done
// because assignments to value types are not atomic, and also because one thread reading
diff --git a/src/libraries/System.Private.CoreLib/src/System/ArrayTypeMismatchException.cs b/src/libraries/System.Private.CoreLib/src/System/ArrayTypeMismatchException.cs
index b709adb3ea37c..f06701be79206 100644
--- a/src/libraries/System.Private.CoreLib/src/System/ArrayTypeMismatchException.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/ArrayTypeMismatchException.cs
@@ -1,23 +1,15 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
-/*=============================================================================
-**
-**
-**
-** Purpose: The arrays are of different primitive types.
-**
-**
-=============================================================================*/
-
using System.ComponentModel;
using System.Runtime.CompilerServices;
using System.Runtime.Serialization;
namespace System
{
- // The ArrayMismatchException is thrown when an attempt to store
- // an object of the wrong type within an array occurs.
+ ///
+ /// The exception that is thrown when an attempt is made to store an element of the wrong type within an array.
+ ///
[Serializable]
[TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
public class ArrayTypeMismatchException : SystemException
diff --git a/src/libraries/System.Private.CoreLib/src/System/AsyncCallback.cs b/src/libraries/System.Private.CoreLib/src/System/AsyncCallback.cs
index 8584a62b0fc54..b47ac0f0e966c 100644
--- a/src/libraries/System.Private.CoreLib/src/System/AsyncCallback.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/AsyncCallback.cs
@@ -1,15 +1,10 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
-/*============================================================
-**
-** Interface: AsyncCallbackDelegate
-**
-** Purpose: Type of callback for async operations
-**
-===========================================================*/
-
namespace System
{
+ ///
+ /// References a method to be called when a corresponding asynchronous operation completes.
+ ///
public delegate void AsyncCallback(IAsyncResult ar);
}
diff --git a/src/libraries/System.Private.CoreLib/src/System/AttributeUsageAttribute.cs b/src/libraries/System.Private.CoreLib/src/System/AttributeUsageAttribute.cs
index 66e9d1d0422e6..901c702cb8830 100644
--- a/src/libraries/System.Private.CoreLib/src/System/AttributeUsageAttribute.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/AttributeUsageAttribute.cs
@@ -1,18 +1,11 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
-/*============================================================
-**
-**
-**
-** Purpose: The class denotes how to specify the usage of an attribute
-**
-**
-===========================================================*/
-
namespace System
{
- /* By default, attributes are inherited and multiple attributes are not allowed */
+ ///
+ /// Specifies the usage of another attribute class.
+ ///
[AttributeUsage(AttributeTargets.Class, Inherited = true)]
public sealed class AttributeUsageAttribute : Attribute
{
diff --git a/src/libraries/System.Private.CoreLib/src/System/BadImageFormatException.cs b/src/libraries/System.Private.CoreLib/src/System/BadImageFormatException.cs
index ff85427170389..437c20b9c9ab1 100644
--- a/src/libraries/System.Private.CoreLib/src/System/BadImageFormatException.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/BadImageFormatException.cs
@@ -1,15 +1,6 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
-/*============================================================
-**
-**
-**
-** Purpose: Exception to an invalid dll or executable format.
-**
-**
-===========================================================*/
-
using System.ComponentModel;
using System.IO;
using System.Runtime.CompilerServices;
@@ -17,6 +8,9 @@
namespace System
{
+ ///
+ /// The exception that is thrown when the file image of an assembly or an executable program is invalid.
+ ///
[Serializable]
[TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
public partial class BadImageFormatException : SystemException
diff --git a/src/libraries/System.Private.CoreLib/src/System/Boolean.cs b/src/libraries/System.Private.CoreLib/src/System/Boolean.cs
index 3a51c7a67fccb..7d9ff445d6b3f 100644
--- a/src/libraries/System.Private.CoreLib/src/System/Boolean.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/Boolean.cs
@@ -1,16 +1,6 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
-/*============================================================
-**
-**
-**
-** Purpose: The boolean class serves as a wrapper for the primitive
-** type boolean.
-**
-**
-===========================================================*/
-
using System.Diagnostics.CodeAnalysis;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
@@ -18,6 +8,9 @@
namespace System
{
+ ///
+ /// Represents a boolean ( or ) value.
+ ///
[Serializable]
[TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
public readonly struct Boolean
diff --git a/src/libraries/System.Private.CoreLib/src/System/CLSCompliantAttribute.cs b/src/libraries/System.Private.CoreLib/src/System/CLSCompliantAttribute.cs
index b6b30707dd22f..17266f5a05b97 100644
--- a/src/libraries/System.Private.CoreLib/src/System/CLSCompliantAttribute.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/CLSCompliantAttribute.cs
@@ -1,17 +1,11 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
-/*=============================================================================
-**
-**
-**
-** Purpose: Container for assemblies.
-**
-**
-=============================================================================*/
-
namespace System
{
+ ///
+ /// Indicates whether a program element is compliant with the Common Language Specification (CLS).
+ ///
[AttributeUsage(AttributeTargets.All, Inherited = true, AllowMultiple = false)]
public sealed class CLSCompliantAttribute : Attribute
{
diff --git a/src/libraries/System.Private.CoreLib/src/System/Char.cs b/src/libraries/System.Private.CoreLib/src/System/Char.cs
index 159f74f2e3775..b7e2488712cfc 100644
--- a/src/libraries/System.Private.CoreLib/src/System/Char.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/Char.cs
@@ -1,16 +1,6 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
-/*============================================================
-**
-**
-**
-** Purpose: This is the value class representing a Unicode character
-** Char methods until we create this functionality.
-**
-**
-===========================================================*/
-
using System.Buffers.Binary;
using System.Diagnostics;
using System.Diagnostics.CodeAnalysis;
@@ -23,6 +13,9 @@
namespace System
{
+ ///
+ /// Represents a character as a UTF-16 code unit.
+ ///
[Serializable]
[StructLayout(LayoutKind.Sequential)]
[TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
diff --git a/src/libraries/System.Private.CoreLib/src/System/Collections/ArrayList.cs b/src/libraries/System.Private.CoreLib/src/System/Collections/ArrayList.cs
index 9be595762266a..7090ea8919a54 100644
--- a/src/libraries/System.Private.CoreLib/src/System/Collections/ArrayList.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/Collections/ArrayList.cs
@@ -1,28 +1,15 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
-/*============================================================
-**
-** Class: ArrayList
-**
-** Purpose: Implements a dynamically sized List as an array,
-** and provides many convenience methods for treating
-** an array as an IList.
-**
-===========================================================*/
-
using System.Diagnostics;
using System.Diagnostics.CodeAnalysis;
using System.Runtime.CompilerServices;
namespace System.Collections
{
- // Implements a variable-size List that uses an array of objects to store the
- // elements. A ArrayList has a capacity, which is the allocated length
- // of the internal array. As elements are added to a ArrayList, the capacity
- // of the ArrayList is automatically increased as required by reallocating the
- // internal array.
- //
+ ///
+ /// Implements the interface using an array whose size is dynamically increased as required.
+ ///
[DebuggerTypeProxy(typeof(ArrayListDebugView))]
[DebuggerDisplay("Count = {Count}")]
[Serializable]
diff --git a/src/libraries/System.Private.CoreLib/src/System/Collections/Comparer.cs b/src/libraries/System.Private.CoreLib/src/System/Collections/Comparer.cs
index 809cfdc8b02b7..dbd2cbf86c8c1 100644
--- a/src/libraries/System.Private.CoreLib/src/System/Collections/Comparer.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/Collections/Comparer.cs
@@ -1,12 +1,6 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
-/*============================================================
-**
-** Purpose: Default IComparer implementation.
-**
-===========================================================*/
-
using System.ComponentModel;
using System.Globalization;
using System.Runtime.CompilerServices;
@@ -14,6 +8,9 @@
namespace System.Collections
{
+ ///
+ /// Compares two objects for equivalence, where string comparisons are case-sensitive.
+ ///
[Serializable]
[TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
public sealed class Comparer : IComparer, ISerializable
diff --git a/src/libraries/System.Private.CoreLib/src/System/Collections/Concurrent/ConcurrentQueue.cs b/src/libraries/System.Private.CoreLib/src/System/Collections/Concurrent/ConcurrentQueue.cs
index fb641fd6664f3..bfa9fcf65469e 100644
--- a/src/libraries/System.Private.CoreLib/src/System/Collections/Concurrent/ConcurrentQueue.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/Collections/Concurrent/ConcurrentQueue.cs
@@ -175,7 +175,7 @@ void ICollection.CopyTo(Array array, int index)
///
/// The object to add to the . The value can be a null
- /// reference (Nothing in Visual Basic) for reference types.
+ /// reference ( in Visual Basic) for reference types.
///
/// true if the object was added successfully; otherwise, false.
/// For , this operation will always add the object to the
@@ -597,7 +597,7 @@ private static IEnumerator Enumerate(ConcurrentQueueSegment head, int head
/// Adds an object to the end of the .
///
/// The object to add to the end of the .
- /// The value can be a null reference (Nothing in Visual Basic) for reference types.
+ /// The value can be a null reference ( in Visual Basic) for reference types.
///
public void Enqueue(T item)
{
diff --git a/src/libraries/System.Private.CoreLib/src/System/Collections/Generic/Queue.cs b/src/libraries/System.Private.CoreLib/src/System/Collections/Generic/Queue.cs
index 65d09c1e116e1..9d9ec66416736 100644
--- a/src/libraries/System.Private.CoreLib/src/System/Collections/Generic/Queue.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/Collections/Generic/Queue.cs
@@ -1,22 +1,18 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
-/*=============================================================================
-**
-**
-** Purpose: A circular-array implementation of a generic queue.
-**
-**
-=============================================================================*/
-
using System.Diagnostics;
using System.Diagnostics.CodeAnalysis;
using System.Runtime.CompilerServices;
namespace System.Collections.Generic
{
- // A simple Queue of generic objects. Internally it is implemented as a
- // circular buffer, so Enqueue can be O(n). Dequeue is O(1).
+ ///
+ /// Represents a first-in, first-out collection of objects.
+ ///
+ ///
+ /// Implemented as a circular buffer, so and are typically O(1).
+ ///
[DebuggerTypeProxy(typeof(QueueDebugView<>))]
[DebuggerDisplay("Count = {Count}")]
[Serializable]
diff --git a/src/libraries/System.Private.CoreLib/src/System/Collections/KeyValuePairs.cs b/src/libraries/System.Private.CoreLib/src/System/Collections/KeyValuePairs.cs
index 58eb617a8e474..87543d938751b 100644
--- a/src/libraries/System.Private.CoreLib/src/System/Collections/KeyValuePairs.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/Collections/KeyValuePairs.cs
@@ -1,19 +1,13 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
-/*============================================================
-**
-** Class: KeyValuePairs
-**
-** Purpose: Defines key/value pairs for displaying items
-** in a collection class under the debugger.
-**
-===========================================================*/
-
using System.Diagnostics;
namespace System.Collections
{
+ ///
+ /// Defines key/value pairs for displaying items in a collection class under the debugger.
+ ///
[DebuggerDisplay("{_value}", Name = "[{_key}]")]
internal sealed class KeyValuePairs
{
diff --git a/src/libraries/System.Private.CoreLib/src/System/Collections/ListDictionaryInternal.cs b/src/libraries/System.Private.CoreLib/src/System/Collections/ListDictionaryInternal.cs
index aff9166ee4fe3..e846bd4eaaafa 100644
--- a/src/libraries/System.Private.CoreLib/src/System/Collections/ListDictionaryInternal.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/Collections/ListDictionaryInternal.cs
@@ -1,23 +1,13 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
-/*============================================================
-**
-**
-**
-**
-**
-** Purpose: List for exceptions.
-**
-**
-===========================================================*/
-
using System.Runtime.CompilerServices;
namespace System.Collections
{
- /// This is a simple implementation of IDictionary using a singly linked list. This
- /// will be smaller and faster than a Hashtable if the number of elements is 10 or less.
- /// This should not be used if performance is important for large numbers of elements.
+ ///
+ /// Implements using a singly linked list.
+ /// Recommended for collections that typically include fewer than 10 items.
+ ///
[Serializable]
[TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
// Needs to be public to support binary serialization compatibility
diff --git a/src/libraries/System.Private.CoreLib/src/System/CurrentSystemTimeZone.cs b/src/libraries/System.Private.CoreLib/src/System/CurrentSystemTimeZone.cs
index 506e457c3fb60..65eefba75e8f3 100644
--- a/src/libraries/System.Private.CoreLib/src/System/CurrentSystemTimeZone.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/CurrentSystemTimeZone.cs
@@ -1,26 +1,14 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
-/*============================================================
-**
-**
-**
-** Purpose:
-** This class represents the current system timezone. It is
-** the only meaningful implementation of the TimeZone class
-** available in this version.
-**
-** The only TimeZone that we support in version 1 is the
-** CurrentTimeZone as determined by the system timezone.
-**
-**
-============================================================*/
-
using System.Collections;
using System.Globalization;
namespace System
{
+ ///
+ /// Represents the current system timezone.
+ ///
[Obsolete("System.CurrentSystemTimeZone has been deprecated. Investigate the use of System.TimeZoneInfo.Local instead.")]
internal sealed class CurrentSystemTimeZone : TimeZone
{
diff --git a/src/libraries/System.Private.CoreLib/src/System/DataMisalignedException.cs b/src/libraries/System.Private.CoreLib/src/System/DataMisalignedException.cs
index 766e877489b06..7990c153b8c55 100644
--- a/src/libraries/System.Private.CoreLib/src/System/DataMisalignedException.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/DataMisalignedException.cs
@@ -1,19 +1,15 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
-/*=============================================================================
-**
-**
-** Purpose: The exception class for a misaligned access exception
-**
-=============================================================================*/
-
using System.ComponentModel;
using System.Runtime.CompilerServices;
using System.Runtime.Serialization;
namespace System
{
+ ///
+ /// The exception that is thrown when a unit of data is read from or written to an address that is not a multiple of the data size.
+ ///
[Serializable]
[TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
public sealed class DataMisalignedException : SystemException
diff --git a/src/libraries/System.Private.CoreLib/src/System/DayOfWeek.cs b/src/libraries/System.Private.CoreLib/src/System/DayOfWeek.cs
index ce979437e8841..cf48dc6b47d7e 100644
--- a/src/libraries/System.Private.CoreLib/src/System/DayOfWeek.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/DayOfWeek.cs
@@ -1,17 +1,11 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
-/*============================================================
-**
-**
-**
-** Purpose: Enum for the day of the week.
-**
-**
-============================================================*/
-
namespace System
{
+ ///
+ /// Specifies the day of the week.
+ ///
public enum DayOfWeek
{
Sunday = 0,
diff --git a/src/libraries/System.Private.CoreLib/src/System/Diagnostics/CodeAnalysis/SuppressMessageAttribute.cs b/src/libraries/System.Private.CoreLib/src/System/Diagnostics/CodeAnalysis/SuppressMessageAttribute.cs
index e595bdb21ae2f..53f4186503b0c 100644
--- a/src/libraries/System.Private.CoreLib/src/System/Diagnostics/CodeAnalysis/SuppressMessageAttribute.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/Diagnostics/CodeAnalysis/SuppressMessageAttribute.cs
@@ -1,24 +1,12 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
-/*============================================================
-**
-**
-**
-** An attribute to suppress violation messages/warnings
-** by static code analysis tools.
-**
-**
-===========================================================*/
-
namespace System.Diagnostics.CodeAnalysis
{
- [AttributeUsage(
- AttributeTargets.All,
- Inherited = false,
- AllowMultiple = true
- )
- ]
+ ///
+ /// Suppresses reporting of a specific code analysis rule violation, allowing multiple suppressions on a single code artifact. Does not apply to compiler diagnostics.
+ ///
+ [AttributeUsage(AttributeTargets.All, Inherited = false, AllowMultiple = true)]
[Conditional("CODE_ANALYSIS")]
public sealed class SuppressMessageAttribute : Attribute
{
diff --git a/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/EventActivityOptions.cs b/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/EventActivityOptions.cs
index fa44ded6dc254..3eaf8f3abd3a9 100644
--- a/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/EventActivityOptions.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/EventActivityOptions.cs
@@ -1,7 +1,6 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
-
namespace System.Diagnostics.Tracing
{
///
diff --git a/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/TraceLogging/TraceLoggingDataCollector.cs b/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/TraceLogging/TraceLoggingDataCollector.cs
index 6aa6dc6a689d7..f11ecdcc30945 100644
--- a/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/TraceLogging/TraceLoggingDataCollector.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/TraceLogging/TraceLoggingDataCollector.cs
@@ -1,7 +1,6 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
-
namespace System.Diagnostics.Tracing
{
///
diff --git a/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/Winmeta.cs b/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/Winmeta.cs
index 52e3e3af4b370..7577599c60bd5 100644
--- a/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/Winmeta.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/Winmeta.cs
@@ -1,19 +1,11 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
-/*============================================================
-**
-**
-** Purpose:
-** Contains eventing constants defined by the Windows
-** environment.
-**
-============================================================*/
-
namespace System.Diagnostics.Tracing
{
///
- /// WindowsEventLevel. Custom values must be in the range from 16 through 255
+ /// Contains an event level that is defined in an event provider. The level signifies the severity of the event.
+ /// Custom values must be in the range from 16 through 255.
///
public enum EventLevel
{
@@ -42,8 +34,10 @@ public enum EventLevel
///
Verbose
}
+
///
- /// WindowsEventTask. Custom values must be in the range from 1 through 65534
+ /// Contains an event task that is defined in an event provider. The task identifies a portion of an application or a component that publishes an event. A task is a 16-bit value with 16 top values reserved.
+ /// Custom values must be in the range from 1 through 65534.
///
public enum EventTask
{
@@ -52,8 +46,10 @@ public enum EventTask
///
None = 0
}
+
///
- /// EventOpcode. Custom values must be in the range from 11 through 239
+ /// Contains an event opcode that is defined in an event provider. An opcode defines a numeric value that identifies the activity or a point within an activity that the application was performing when it raised the event.
+ /// Custom values must be in the range from 11 through 239.
///
public enum EventOpcode
{
@@ -103,9 +99,8 @@ public enum EventOpcode
Receive = 240
}
- // Added for CLR V4
///
- /// EventChannel. Custom values must be in the range from 16 through 255. Currently only predefined values allowed.
+ /// Specifies the event log channel for the event.
///
public enum EventChannel : byte
{
@@ -125,7 +120,7 @@ public enum EventChannel : byte
}
///
- /// EventOpcode
+ /// Defines the standard keywords that apply to events.
///
[Flags]
public enum EventKeywords : long
diff --git a/src/libraries/System.Private.CoreLib/src/System/DivideByZeroException.cs b/src/libraries/System.Private.CoreLib/src/System/DivideByZeroException.cs
index 8c58e5cf7281e..33b2853620ba9 100644
--- a/src/libraries/System.Private.CoreLib/src/System/DivideByZeroException.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/DivideByZeroException.cs
@@ -1,21 +1,15 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
-/*=============================================================================
-**
-**
-**
-** Purpose: Exception class for bad arithmetic conditions!
-**
-**
-=============================================================================*/
-
using System.ComponentModel;
using System.Runtime.CompilerServices;
using System.Runtime.Serialization;
namespace System
{
+ ///
+ /// The exception that is thrown when there is an attempt to divide an integral or value by zero.
+ ///
[Serializable]
[TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
public class DivideByZeroException : ArithmeticException
diff --git a/src/libraries/System.Private.CoreLib/src/System/DllNotFoundException.cs b/src/libraries/System.Private.CoreLib/src/System/DllNotFoundException.cs
index 6836322843b5f..76e6968e48a58 100644
--- a/src/libraries/System.Private.CoreLib/src/System/DllNotFoundException.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/DllNotFoundException.cs
@@ -1,22 +1,15 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
-/*=============================================================================
-**
-** Class: DllNotFoundException
-**
-**
-** Purpose: The exception class for some failed P/Invoke calls.
-**
-**
-=============================================================================*/
-
using System.ComponentModel;
using System.Runtime.CompilerServices;
using System.Runtime.Serialization;
namespace System
{
+ ///
+ /// The exception that is thrown when a DLL specified in a DLL import cannot be found.
+ ///
[Serializable]
[TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
public class DllNotFoundException : TypeLoadException
diff --git a/src/libraries/System.Private.CoreLib/src/System/Double.cs b/src/libraries/System.Private.CoreLib/src/System/Double.cs
index 9058eaecf4f23..48067b789891b 100644
--- a/src/libraries/System.Private.CoreLib/src/System/Double.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/Double.cs
@@ -1,16 +1,6 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
-/*============================================================
-**
-**
-**
-** Purpose: A representation of an IEEE double precision
-** floating point number.
-**
-**
-===========================================================*/
-
using System.Buffers.Binary;
using System.Diagnostics;
using System.Diagnostics.CodeAnalysis;
@@ -22,6 +12,9 @@
namespace System
{
+ ///
+ /// Represents a double-precision floating-point number.
+ ///
[Serializable]
[StructLayout(LayoutKind.Sequential)]
[TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
diff --git a/src/libraries/System.Private.CoreLib/src/System/DuplicateWaitObjectException.cs b/src/libraries/System.Private.CoreLib/src/System/DuplicateWaitObjectException.cs
index d7fc7c46be958..f83bde1bdd2a3 100644
--- a/src/libraries/System.Private.CoreLib/src/System/DuplicateWaitObjectException.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/DuplicateWaitObjectException.cs
@@ -1,23 +1,15 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
-/*=============================================================================
-**
-**
-**
-** Purpose: Exception class for duplicate objects in WaitAll/WaitAny.
-**
-**
-=============================================================================*/
-
using System.ComponentModel;
using System.Runtime.CompilerServices;
using System.Runtime.Serialization;
namespace System
{
- // The DuplicateWaitObjectException is thrown when an object
- // appears more than once in the list of objects to WaitAll or WaitAny.
+ ///
+ /// The exception that is thrown when an object appears more than once in an array of synchronization objects.
+ ///
[Serializable]
[TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
public class DuplicateWaitObjectException : ArgumentException
diff --git a/src/libraries/System.Private.CoreLib/src/System/EntryPointNotFoundException.cs b/src/libraries/System.Private.CoreLib/src/System/EntryPointNotFoundException.cs
index 5df0ea7885bf0..4eac8c07d538d 100644
--- a/src/libraries/System.Private.CoreLib/src/System/EntryPointNotFoundException.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/EntryPointNotFoundException.cs
@@ -1,21 +1,15 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
-/*=============================================================================
-**
-**
-**
-** Purpose: The exception class for some failed P/Invoke calls.
-**
-**
-=============================================================================*/
-
using System.ComponentModel;
using System.Runtime.CompilerServices;
using System.Runtime.Serialization;
namespace System
{
+ ///
+ /// The exception that is thrown when an attempt to load a class fails due to the absence of an entry method.
+ ///
[Serializable]
[TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
public class EntryPointNotFoundException : TypeLoadException
diff --git a/src/libraries/System.Private.CoreLib/src/System/ExecutionEngineException.cs b/src/libraries/System.Private.CoreLib/src/System/ExecutionEngineException.cs
index 139d391ce1d64..1cdb62dc705fe 100644
--- a/src/libraries/System.Private.CoreLib/src/System/ExecutionEngineException.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/ExecutionEngineException.cs
@@ -1,24 +1,14 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
-//
-//
-/*=============================================================================
-**
-**
-**
-** Purpose: The exception class for misc execution engine exceptions.
-** Currently, its only used as a placeholder type when the EE
-** does a FailFast.
-**
-**
-=============================================================================*/
-
using System.Runtime.CompilerServices;
using System.Runtime.Serialization;
namespace System
{
+ ///
+ /// The exception that is thrown when there is an internal error in the execution engine of the common language runtime.
+ ///
[Obsolete("ExecutionEngineException previously indicated an unspecified fatal error in the runtime. The runtime no longer raises this exception so this type is obsolete.")]
[Serializable]
[TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
diff --git a/src/libraries/System.Private.CoreLib/src/System/FieldAccessException.cs b/src/libraries/System.Private.CoreLib/src/System/FieldAccessException.cs
index ae929df93eeb7..5855b9e6c5ebc 100644
--- a/src/libraries/System.Private.CoreLib/src/System/FieldAccessException.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/FieldAccessException.cs
@@ -1,19 +1,15 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
-/*=============================================================================
-**
-**
-** Purpose: The exception class for class loading failures.
-**
-=============================================================================*/
-
using System.ComponentModel;
using System.Runtime.CompilerServices;
using System.Runtime.Serialization;
namespace System
{
+ ///
+ /// The exception that is thrown when there is an invalid attempt to access a private or protected field inside a class.
+ ///
[Serializable]
[TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
public class FieldAccessException : MemberAccessException
diff --git a/src/libraries/System.Private.CoreLib/src/System/FormatException.cs b/src/libraries/System.Private.CoreLib/src/System/FormatException.cs
index 4cca4845f1385..36bb7db6db621 100644
--- a/src/libraries/System.Private.CoreLib/src/System/FormatException.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/FormatException.cs
@@ -1,21 +1,15 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
-/*============================================================
-**
-**
-**
-** Purpose: Exception to designate an illegal argument to FormatMessage.
-**
-**
-===========================================================*/
-
using System.ComponentModel;
using System.Runtime.CompilerServices;
using System.Runtime.Serialization;
namespace System
{
+ ///
+ /// The exception that is thrown when the format of an argument is invalid, or when a composite format string is not well formed.
+ ///
[Serializable]
[TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
public class FormatException : SystemException
diff --git a/src/libraries/System.Private.CoreLib/src/System/FormattableString.cs b/src/libraries/System.Private.CoreLib/src/System/FormattableString.cs
index 60b16ccf09d96..43131e63dcacb 100644
--- a/src/libraries/System.Private.CoreLib/src/System/FormattableString.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/FormattableString.cs
@@ -1,23 +1,16 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
-/*============================================================
-**
-**
-**
-** Purpose: implementation of the FormattableString
-** class.
-**
-===========================================================*/
-
using System.Diagnostics.CodeAnalysis;
namespace System
{
///
- /// A composite format string along with the arguments to be formatted. An instance of this
- /// type may result from the use of the C# or VB language primitive "interpolated string".
+ /// Represents a composite format string, along with the arguments to be formatted.
///
+ ///
+ /// An instance of this type may result from the use of the C# or VB language primitive "interpolated string".
+ ///
public abstract class FormattableString : IFormattable
{
///
diff --git a/src/libraries/System.Private.CoreLib/src/System/Globalization/DateTimeStyles.cs b/src/libraries/System.Private.CoreLib/src/System/Globalization/DateTimeStyles.cs
index b35ae7633aaae..1a38e95f0edb6 100644
--- a/src/libraries/System.Private.CoreLib/src/System/Globalization/DateTimeStyles.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/Globalization/DateTimeStyles.cs
@@ -1,18 +1,11 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
-/*============================================================
-**
-**
-**
-** Purpose: Contains valid formats for DateTime recognized by
-** the DateTime class' parsing code.
-**
-**
-===========================================================*/
-
namespace System.Globalization
{
+ ///
+ /// Defines the formatting options that customize string parsing for some date and time parsing methods.
+ ///
[Flags]
public enum DateTimeStyles
{
@@ -20,7 +13,6 @@ public enum DateTimeStyles
// 0x0009, 0x000A, 0x000B, 0x000C, 0x000D, and 0x0020 are considered to be
// whitespace.
-
None = 0x00000000,
AllowLeadingWhite = 0x00000001,
diff --git a/src/libraries/System.Private.CoreLib/src/System/Half.cs b/src/libraries/System.Private.CoreLib/src/System/Half.cs
index 4b1c9477ec48f..91bcd1687bb67 100644
--- a/src/libraries/System.Private.CoreLib/src/System/Half.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/Half.cs
@@ -15,7 +15,7 @@ namespace System
// Portions of the code implemented below are based on the 'Berkeley SoftFloat Release 3e' algorithms.
///
- /// An IEEE 754 compliant float16 type.
+ /// Represents a half-precision floating-point number.
///
[StructLayout(LayoutKind.Sequential)]
public readonly struct Half
diff --git a/src/libraries/System.Private.CoreLib/src/System/IAsyncResult.cs b/src/libraries/System.Private.CoreLib/src/System/IAsyncResult.cs
index 85f8063bb8562..b56586159439b 100644
--- a/src/libraries/System.Private.CoreLib/src/System/IAsyncResult.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/IAsyncResult.cs
@@ -1,26 +1,19 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
-/*============================================================
-**
-** Interface: IAsyncResult
-**
-** Purpose: Interface to encapsulate the results of an async
-** operation
-**
-===========================================================*/
-
using System.Threading;
namespace System
{
+ ///
+ /// Represents the status of an asynchronous operation.
+ ///
public interface IAsyncResult
{
bool IsCompleted { get; }
WaitHandle AsyncWaitHandle { get; }
-
object? AsyncState { get; }
bool CompletedSynchronously { get; }
diff --git a/src/libraries/System.Private.CoreLib/src/System/ICustomFormatter.cs b/src/libraries/System.Private.CoreLib/src/System/ICustomFormatter.cs
index 88c852e5b2664..f3f1eb420ae4f 100644
--- a/src/libraries/System.Private.CoreLib/src/System/ICustomFormatter.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/ICustomFormatter.cs
@@ -1,18 +1,11 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
-/*============================================================
-**
-** Interface: ICustomFormatter
-**
-**
-** Purpose: Marks a class as providing special formatting
-**
-**
-===========================================================*/
-
namespace System
{
+ ///
+ /// Defines a method that supports custom formatting of the value of an object.
+ ///
public interface ICustomFormatter
{
string Format(string? format, object? arg, IFormatProvider? formatProvider);
diff --git a/src/libraries/System.Private.CoreLib/src/System/IFormatProvider.cs b/src/libraries/System.Private.CoreLib/src/System/IFormatProvider.cs
index 3cfd981647ca3..34fb47dadfe46 100644
--- a/src/libraries/System.Private.CoreLib/src/System/IFormatProvider.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/IFormatProvider.cs
@@ -1,17 +1,11 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
-/*============================================================
-**
-**
-**
-** Purpose: Notes a class which knows how to return formatting information
-**
-**
-============================================================*/
-
namespace System
{
+ ///
+ /// Provides a mechanism for retrieving an object to control formatting.
+ ///
public interface IFormatProvider
{
// Interface does not need to be marked with the serializable attribute
diff --git a/src/libraries/System.Private.CoreLib/src/System/IO/BinaryReader.cs b/src/libraries/System.Private.CoreLib/src/System/IO/BinaryReader.cs
index fe353d35e1c3a..e151137f05437 100644
--- a/src/libraries/System.Private.CoreLib/src/System/IO/BinaryReader.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/IO/BinaryReader.cs
@@ -1,18 +1,6 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
-/*============================================================
-**
-**
-**
-**
-**
-** Purpose: Wraps a stream and provides convenient read functionality
-** for strings and primitive types.
-**
-**
-============================================================*/
-
using System.Buffers.Binary;
using System.Diagnostics;
using System.Runtime.CompilerServices;
@@ -20,6 +8,9 @@
namespace System.IO
{
+ ///
+ /// Reads primitive data types as binary values in a specific encoding.
+ ///
public class BinaryReader : IDisposable
{
private const int MaxCharBytesSize = 128;
diff --git a/src/libraries/System.Private.CoreLib/src/System/IO/PinnedBufferMemoryStream.cs b/src/libraries/System.Private.CoreLib/src/System/IO/PinnedBufferMemoryStream.cs
index 6a980d9fe1103..2d33c11b704a1 100644
--- a/src/libraries/System.Private.CoreLib/src/System/IO/PinnedBufferMemoryStream.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/IO/PinnedBufferMemoryStream.cs
@@ -1,23 +1,14 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
-/*============================================================
-**
-**
-**
-**
-**
-** Purpose: Pins a byte[], exposing it as an unmanaged memory
-** stream. Used in ResourceReader for corner cases.
-**
-**
-===========================================================*/
-
using System.Runtime.InteropServices;
using System.Diagnostics;
namespace System.IO
{
+ ///
+ /// Pins a , exposing it as an unmanaged memory stream. Used in for corner cases.
+ ///
internal sealed unsafe class PinnedBufferMemoryStream : UnmanagedMemoryStream
{
private readonly byte[] _array;
diff --git a/src/libraries/System.Private.CoreLib/src/System/IO/UnmanagedMemoryAccessor.cs b/src/libraries/System.Private.CoreLib/src/System/IO/UnmanagedMemoryAccessor.cs
index 488bb1e09ea3e..dbb896a39f139 100644
--- a/src/libraries/System.Private.CoreLib/src/System/IO/UnmanagedMemoryAccessor.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/IO/UnmanagedMemoryAccessor.cs
@@ -1,26 +1,18 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
-/*============================================================
-**
-**
-**
-**
-** Purpose: Provides a fast, AV free, cross-language way of
-** accessing unmanaged memory in a random fashion.
-**
-**
-===========================================================*/
-
using System.Diagnostics;
using System.Runtime.InteropServices;
using System.Runtime.CompilerServices;
namespace System.IO
{
- /// Perf notes: ReadXXX, WriteXXX (for basic types) acquire and release the
- /// SafeBuffer pointer rather than relying on generic Read(T) from SafeBuffer because
- /// this gives better throughput; benchmarks showed about 12-15% better.
+ ///
+ /// Provides random access to unmanaged blocks of memory from managed code.
+ ///
+ // Perf notes: ReadXXX, WriteXXX (for basic types) acquire and release the
+ // SafeBuffer pointer rather than relying on generic Read(T) from SafeBuffer because
+ // this gives better throughput; benchmarks showed about 12-15% better.
public class UnmanagedMemoryAccessor : IDisposable
{
private SafeBuffer _buffer = null!; // initialized in helper called by ctor, but also not initialized by protected ctor
diff --git a/src/libraries/System.Private.CoreLib/src/System/IO/UnmanagedMemoryStreamWrapper.cs b/src/libraries/System.Private.CoreLib/src/System/IO/UnmanagedMemoryStreamWrapper.cs
index bdab1b017534b..bcbe2b523d58c 100644
--- a/src/libraries/System.Private.CoreLib/src/System/IO/UnmanagedMemoryStreamWrapper.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/IO/UnmanagedMemoryStreamWrapper.cs
@@ -1,23 +1,14 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
-/*============================================================
-**
-**
-**
-**
-** Purpose: Create a Memorystream over an UnmanagedMemoryStream
-**
-===========================================================*/
-
using System.Threading;
using System.Threading.Tasks;
namespace System.IO
{
- // Needed for backwards compatibility with V1.x usages of the
- // ResourceManager, where a MemoryStream is now returned as an
- // UnmanagedMemoryStream from ResourceReader.
+ ///
+ /// Creates a over an .
+ ///
internal sealed class UnmanagedMemoryStreamWrapper : MemoryStream
{
private readonly UnmanagedMemoryStream _unmanagedStream;
diff --git a/src/libraries/System.Private.CoreLib/src/System/IndexOutOfRangeException.cs b/src/libraries/System.Private.CoreLib/src/System/IndexOutOfRangeException.cs
index bcd865853837b..d5ab3d4648a02 100644
--- a/src/libraries/System.Private.CoreLib/src/System/IndexOutOfRangeException.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/IndexOutOfRangeException.cs
@@ -1,20 +1,14 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
-/*=============================================================================
-**
-**
-**
-** Purpose: Exception class for invalid array indices.
-**
-**
-=============================================================================*/
-
using System.Runtime.CompilerServices;
using System.Runtime.Serialization;
namespace System
{
+ ///
+ /// The exception that is thrown when an attempt is made to access an element of an array or collection with an index that is outside its bounds.
+ ///
[Serializable]
[TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
public sealed class IndexOutOfRangeException : SystemException
diff --git a/src/libraries/System.Private.CoreLib/src/System/InvalidCastException.cs b/src/libraries/System.Private.CoreLib/src/System/InvalidCastException.cs
index 9a8df55017d05..7e97f583a3ef1 100644
--- a/src/libraries/System.Private.CoreLib/src/System/InvalidCastException.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/InvalidCastException.cs
@@ -1,18 +1,15 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
-/*=============================================================================
-**
-** Purpose: Exception class for invalid cast conditions!
-**
-=============================================================================*/
-
using System.ComponentModel;
using System.Runtime.CompilerServices;
using System.Runtime.Serialization;
namespace System
{
+ ///
+ /// The exception that is thrown for invalid casting or explicit conversion.
+ ///
[Serializable]
[TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
public class InvalidCastException : SystemException
diff --git a/src/libraries/System.Private.CoreLib/src/System/InvalidOperationException.cs b/src/libraries/System.Private.CoreLib/src/System/InvalidOperationException.cs
index 20cf8a66cb509..97233835319c0 100644
--- a/src/libraries/System.Private.CoreLib/src/System/InvalidOperationException.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/InvalidOperationException.cs
@@ -1,22 +1,15 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
-/*=============================================================================
-**
-**
-**
-** Purpose: Exception class for denoting an object was in a state that
-** made calling a method illegal.
-**
-**
-=============================================================================*/
-
using System.ComponentModel;
using System.Runtime.CompilerServices;
using System.Runtime.Serialization;
namespace System
{
+ ///
+ /// The exception that is thrown when a method call is invalid for the object's current state.
+ ///
[Serializable]
[TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
public class InvalidOperationException : SystemException
diff --git a/src/libraries/System.Private.CoreLib/src/System/InvalidProgramException.cs b/src/libraries/System.Private.CoreLib/src/System/InvalidProgramException.cs
index 675dc6597e62e..c59cad49ac3a0 100644
--- a/src/libraries/System.Private.CoreLib/src/System/InvalidProgramException.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/InvalidProgramException.cs
@@ -1,20 +1,15 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
-/*=============================================================================
-**
-**
-**
-** Purpose: The exception class for programs with invalid IL or bad metadata.
-**
-**
-=============================================================================*/
-
using System.Runtime.CompilerServices;
using System.Runtime.Serialization;
namespace System
{
+ ///
+ /// The exception that is thrown when a program contains invalid IL or metadata.
+ /// This exception is also thrown when internal runtime implementation limits have been exceeded by the program.
+ ///
[Serializable]
[TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
public sealed class InvalidProgramException : SystemException
diff --git a/src/libraries/System.Private.CoreLib/src/System/Lazy.cs b/src/libraries/System.Private.CoreLib/src/System/Lazy.cs
index f7be79c820114..cfae4e617296b 100644
--- a/src/libraries/System.Private.CoreLib/src/System/Lazy.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/Lazy.cs
@@ -231,7 +231,7 @@ public Lazy(T value)
/// needed.
///
/// is a null
- /// reference (Nothing in Visual Basic).
+ /// reference ( in Visual Basic).
///
/// An instance created with this constructor may be used concurrently from multiple threads.
///
@@ -272,7 +272,7 @@ public Lazy(LazyThreadSafetyMode mode) :
/// true if this instance should be usable by multiple threads concurrently; false if the instance will only be used by one thread at a time.
///
/// is
- /// a null reference (Nothing in Visual Basic).
+ /// a null reference ( in Visual Basic).
public Lazy(Func valueFactory, bool isThreadSafe) :
this(valueFactory, LazyHelper.GetModeFromIsThreadSafe(isThreadSafe), useDefaultConstructor: false)
{
@@ -287,7 +287,7 @@ public Lazy(Func valueFactory, bool isThreadSafe) :
///
/// The lazy thread-safety mode.
/// is
- /// a null reference (Nothing in Visual Basic).
+ /// a null reference ( in Visual Basic).
/// mode contains an invalid value.
public Lazy(Func valueFactory, LazyThreadSafetyMode mode)
: this(valueFactory, mode, useDefaultConstructor: false)
diff --git a/src/libraries/System.Private.CoreLib/src/System/Math.cs b/src/libraries/System.Private.CoreLib/src/System/Math.cs
index db55090f80f84..7d20cc72202dd 100644
--- a/src/libraries/System.Private.CoreLib/src/System/Math.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/Math.cs
@@ -5,15 +5,6 @@
// Portions of the code implemented below are based on the 'Berkeley SoftFloat Release 3e' algorithms.
// ===================================================================================================
-/*============================================================
-**
-**
-**
-** Purpose: Some floating-point math operations
-**
-**
-===========================================================*/
-
using System.Diagnostics;
using System.Diagnostics.CodeAnalysis;
using System.Numerics;
@@ -25,6 +16,9 @@
namespace System
{
+ ///
+ /// Provides constants and static methods for trigonometric, logarithmic, and other common mathematical functions.
+ ///
public static partial class Math
{
public const double E = 2.7182818284590452354;
diff --git a/src/libraries/System.Private.CoreLib/src/System/MathF.cs b/src/libraries/System.Private.CoreLib/src/System/MathF.cs
index 17f466bae2790..2726d14492f6a 100644
--- a/src/libraries/System.Private.CoreLib/src/System/MathF.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/MathF.cs
@@ -5,12 +5,6 @@
// Portions of the code implemented below are based on the 'Berkeley SoftFloat Release 3e' algorithms.
// ===================================================================================================
-/*============================================================
-**
-** Purpose: Some single-precision floating-point math operations
-**
-===========================================================*/
-
using System.Diagnostics;
using System.Numerics;
using System.Runtime.CompilerServices;
@@ -20,6 +14,9 @@
namespace System
{
+ ///
+ /// Provides constants and static methods for trigonometric, logarithmic, and other common mathematical functions.
+ ///
public static partial class MathF
{
public const float E = 2.71828183f;
diff --git a/src/libraries/System.Private.CoreLib/src/System/MethodAccessException.cs b/src/libraries/System.Private.CoreLib/src/System/MethodAccessException.cs
index c31ddf1f5c5e2..1777f153f3806 100644
--- a/src/libraries/System.Private.CoreLib/src/System/MethodAccessException.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/MethodAccessException.cs
@@ -1,19 +1,15 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
-/*=============================================================================
-**
-**
-** Purpose: The exception class for class loading failures.
-**
-=============================================================================*/
-
using System.ComponentModel;
using System.Runtime.CompilerServices;
using System.Runtime.Serialization;
namespace System
{
+ ///
+ /// The exception that is thrown when there is an invalid attempt to access a method.
+ ///
[Serializable]
[TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
public class MethodAccessException : MemberAccessException
diff --git a/src/libraries/System.Private.CoreLib/src/System/MissingMethodException.cs b/src/libraries/System.Private.CoreLib/src/System/MissingMethodException.cs
index 857b171975901..9399470cef91a 100644
--- a/src/libraries/System.Private.CoreLib/src/System/MissingMethodException.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/MissingMethodException.cs
@@ -1,21 +1,15 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
-/*=============================================================================
-**
-**
-**
-** Purpose: The exception class for class loading failures.
-**
-**
-=============================================================================*/
-
using System.ComponentModel;
using System.Runtime.CompilerServices;
using System.Runtime.Serialization;
namespace System
{
+ ///
+ /// The exception that is thrown when there is an attempt to dynamically access a method that does not exist.
+ ///
[Serializable]
[TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
public class MissingMethodException : MissingMemberException
diff --git a/src/libraries/System.Private.CoreLib/src/System/NotImplementedException.cs b/src/libraries/System.Private.CoreLib/src/System/NotImplementedException.cs
index bfc1c0d983eb9..17062b45a4557 100644
--- a/src/libraries/System.Private.CoreLib/src/System/NotImplementedException.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/NotImplementedException.cs
@@ -1,22 +1,15 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
-/*=============================================================================
-**
-**
-**
-** Purpose: Exception thrown when a requested method or operation is not
-** implemented.
-**
-**
-=============================================================================*/
-
using System.ComponentModel;
using System.Runtime.CompilerServices;
using System.Runtime.Serialization;
namespace System
{
+ ///
+ /// The exception that is thrown when a requested method or operation is not implemented.
+ ///
[Serializable]
[TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
public class NotImplementedException : SystemException
diff --git a/src/libraries/System.Private.CoreLib/src/System/NotSupportedException.cs b/src/libraries/System.Private.CoreLib/src/System/NotSupportedException.cs
index 2b4a34461f762..40e638d01b7b5 100644
--- a/src/libraries/System.Private.CoreLib/src/System/NotSupportedException.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/NotSupportedException.cs
@@ -1,21 +1,16 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
-/*=============================================================================
-**
-**
-**
-** Purpose: For methods that should be implemented on subclasses.
-**
-**
-=============================================================================*/
-
using System.ComponentModel;
using System.Runtime.CompilerServices;
using System.Runtime.Serialization;
namespace System
{
+ ///
+ /// The exception that is thrown when an invoked method is not supported,
+ /// typically because it should have been implemented on a subclass.
+ ///
[Serializable]
[TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
public class NotSupportedException : SystemException
diff --git a/src/libraries/System.Private.CoreLib/src/System/NullReferenceException.cs b/src/libraries/System.Private.CoreLib/src/System/NullReferenceException.cs
index 5d466a6e0ae9b..095b4310627fe 100644
--- a/src/libraries/System.Private.CoreLib/src/System/NullReferenceException.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/NullReferenceException.cs
@@ -1,21 +1,15 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
-/*=============================================================================
-**
-**
-**
-** Purpose: Exception class for dereferencing a null reference.
-**
-**
-=============================================================================*/
-
using System.ComponentModel;
using System.Runtime.CompilerServices;
using System.Runtime.Serialization;
namespace System
{
+ ///
+ /// The exception that is thrown when there is an attempt to dereference a object reference.
+ ///
[Serializable]
[TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
public class NullReferenceException : SystemException
diff --git a/src/libraries/System.Private.CoreLib/src/System/ObsoleteAttribute.cs b/src/libraries/System.Private.CoreLib/src/System/ObsoleteAttribute.cs
index 257ef545921e4..29c823ed1f845 100644
--- a/src/libraries/System.Private.CoreLib/src/System/ObsoleteAttribute.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/ObsoleteAttribute.cs
@@ -1,26 +1,11 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
-/*============================================================
-**
-**
-**
-** Purpose: Attribute for functions, etc that will be removed.
-**
-**
-===========================================================*/
-
namespace System
{
- // This attribute is attached to members that are not to be used any longer.
- // Message is some human readable explanation of what to use
- // Error indicates if the compiler should treat usage of such a method as an
- // error. (this would be used if the actual implementation of the obsolete
- // method's implementation had changed).
- // DiagnosticId. Represents the ID the compiler will use when reporting a use of the API.
- // UrlFormat.The URL that should be used by an IDE for navigating to corresponding documentation. Instead of taking the URL directly,
- // the API takes a format string. This allows having a generic URL that includes the diagnostic ID.
- //
+ ///
+ /// Marks program elements that are no longer in use.
+ ///
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Enum |
AttributeTargets.Interface | AttributeTargets.Constructor | AttributeTargets.Method | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Delegate,
Inherited = false)]
diff --git a/src/libraries/System.Private.CoreLib/src/System/OperationCanceledException.cs b/src/libraries/System.Private.CoreLib/src/System/OperationCanceledException.cs
index 7a88cf737fcb5..2a01950c0df8d 100644
--- a/src/libraries/System.Private.CoreLib/src/System/OperationCanceledException.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/OperationCanceledException.cs
@@ -1,15 +1,6 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
-/*============================================================
-**
-**
-**
-** Purpose: Exception for cancelled IO requests.
-**
-**
-===========================================================*/
-
using System.ComponentModel;
using System.Runtime.CompilerServices;
using System.Runtime.Serialization;
@@ -17,6 +8,9 @@
namespace System
{
+ ///
+ /// The exception that is thrown in a thread upon cancellation of an operation that the thread was executing.
+ ///
[Serializable]
[TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
public class OperationCanceledException : SystemException
diff --git a/src/libraries/System.Private.CoreLib/src/System/OverflowException.cs b/src/libraries/System.Private.CoreLib/src/System/OverflowException.cs
index 8899e06d78a83..04cdf39076c86 100644
--- a/src/libraries/System.Private.CoreLib/src/System/OverflowException.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/OverflowException.cs
@@ -1,21 +1,15 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
-/*=============================================================================
-**
-**
-**
-** Purpose: Exception class for Arithmetic Overflows.
-**
-**
-=============================================================================*/
-
using System.ComponentModel;
using System.Runtime.CompilerServices;
using System.Runtime.Serialization;
namespace System
{
+ ///
+ /// The exception that is thrown when an arithmetic, casting, or conversion operation in a checked context results in an overflow.
+ ///
[Serializable]
[TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
public class OverflowException : ArithmeticException
diff --git a/src/libraries/System.Private.CoreLib/src/System/ParamArrayAttribute.cs b/src/libraries/System.Private.CoreLib/src/System/ParamArrayAttribute.cs
index f53406f44cc98..256914e500123 100644
--- a/src/libraries/System.Private.CoreLib/src/System/ParamArrayAttribute.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/ParamArrayAttribute.cs
@@ -1,17 +1,11 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
-/*=============================================================================
-**
-**
-**
-** Purpose: Attribute for multiple parameters.
-**
-**
-=============================================================================*/
-
namespace System
{
+ ///
+ /// Indicates that a method will allow a variable number of arguments in its invocation.
+ ///
[AttributeUsage(AttributeTargets.Parameter, Inherited = true, AllowMultiple = false)]
public sealed class ParamArrayAttribute : Attribute
{
diff --git a/src/libraries/System.Private.CoreLib/src/System/PlatformNotSupportedException.cs b/src/libraries/System.Private.CoreLib/src/System/PlatformNotSupportedException.cs
index 0dc21edd1a727..26932e64ac2c2 100644
--- a/src/libraries/System.Private.CoreLib/src/System/PlatformNotSupportedException.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/PlatformNotSupportedException.cs
@@ -1,21 +1,15 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
-/*=============================================================================
-**
-**
-**
-** Purpose: To handle features that don't run on particular platforms
-**
-**
-=============================================================================*/
-
using System.ComponentModel;
using System.Runtime.CompilerServices;
using System.Runtime.Serialization;
namespace System
{
+ ///
+ /// The exception that is thrown when a feature is not supported on the current platform.
+ ///
[Serializable]
[TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
public class PlatformNotSupportedException : NotSupportedException
diff --git a/src/libraries/System.Private.CoreLib/src/System/Progress.cs b/src/libraries/System.Private.CoreLib/src/System/Progress.cs
index 2e17ec0745c14..ae7cc6bc5a3b9 100644
--- a/src/libraries/System.Private.CoreLib/src/System/Progress.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/Progress.cs
@@ -44,7 +44,7 @@ public Progress()
/// the at construction, it's possible that this handler instance
/// could be invoked concurrently with itself.
///
- /// The is null (Nothing in Visual Basic).
+ /// The is null ( in Visual Basic).
public Progress(Action handler) : this()
{
ArgumentNullException.ThrowIfNull(handler);
diff --git a/src/libraries/System.Private.CoreLib/src/System/RankException.cs b/src/libraries/System.Private.CoreLib/src/System/RankException.cs
index be49c02b0fee8..0db381b36d422 100644
--- a/src/libraries/System.Private.CoreLib/src/System/RankException.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/RankException.cs
@@ -1,22 +1,15 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
-/*=============================================================================
-**
-**
-**
-** Purpose: For methods that are passed arrays with the wrong number of
-** dimensions.
-**
-**
-=============================================================================*/
-
using System.ComponentModel;
using System.Runtime.CompilerServices;
using System.Runtime.Serialization;
namespace System
{
+ ///
+ /// The exception that is thrown when an array with the wrong number of dimensions is passed to a method.
+ ///
[Serializable]
[TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
public class RankException : SystemException
diff --git a/src/libraries/System.Private.CoreLib/src/System/Reflection/Emit/FlowControl.cs b/src/libraries/System.Private.CoreLib/src/System/Reflection/Emit/FlowControl.cs
index 92593e159248b..21497013abe93 100644
--- a/src/libraries/System.Private.CoreLib/src/System/Reflection/Emit/FlowControl.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/Reflection/Emit/FlowControl.cs
@@ -1,18 +1,11 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
-/*============================================================
-**
-** Enumeration: FlowControl
-**
-** Purpose: Exposes FlowControl Attribute of IL.
-**
-** THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT BY HAND!
-** See $(RepoRoot)\src\inc\OpCodeGen.pl for more information.**
-==============================================================*/
-
namespace System.Reflection.Emit
{
+ ///
+ /// Describes how an instruction alters the flow of control.
+ ///
public enum FlowControl
{
Branch = 0,
diff --git a/src/libraries/System.Private.CoreLib/src/System/Reflection/Emit/Label.cs b/src/libraries/System.Private.CoreLib/src/System/Reflection/Emit/Label.cs
index 187933ea16f44..54bf5a05168ac 100644
--- a/src/libraries/System.Private.CoreLib/src/System/Reflection/Emit/Label.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/Reflection/Emit/Label.cs
@@ -1,28 +1,19 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
-/*============================================================
-**
-**
-**
-**
-**
-**
-** Purpose: Represents a Label to the ILGenerator class.
-**
-**
-===========================================================*/
-
using System.Diagnostics.CodeAnalysis;
namespace System.Reflection.Emit
{
- // The Label class is an opaque representation of a label used by the
- // ILGenerator class. The token is used to mark where labels occur in the IL
- // stream and then the necessary offsets are put back in the code when the ILGenerator
- // is passed to the MethodWriter.
- // Labels are created by using ILGenerator.CreateLabel and their position is set
- // by using ILGenerator.MarkLabel.
+ ///
+ /// Represents a label in the instruction stream. Used in conjunction with the class.
+ ///
+ ///
+ /// The Label class is an opaque representation of a label used by the
+ /// class. The token is used to mark where labels occur in the IL
+ /// stream. Labels are created by using and their position is set
+ /// by using .
+ ///
public readonly struct Label : IEquatable
/// The to use to fault the task.
- /// The argument is null (Nothing in Visual Basic).
+ /// The argument is null ( in Visual Basic).
/// The builder is not initialized.
/// The task has already completed.
public void SetException(Exception exception) =>
diff --git a/src/libraries/System.Private.CoreLib/src/System/Runtime/CompilerServices/AsyncTaskMethodBuilderT.cs b/src/libraries/System.Private.CoreLib/src/System/Runtime/CompilerServices/AsyncTaskMethodBuilderT.cs
index 443b8993612a5..91b04bcbefb4a 100644
--- a/src/libraries/System.Private.CoreLib/src/System/Runtime/CompilerServices/AsyncTaskMethodBuilderT.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/Runtime/CompilerServices/AsyncTaskMethodBuilderT.cs
@@ -36,7 +36,7 @@ public void Start(ref TStateMachine stateMachine) where TStateMac
/// Associates the builder with the state machine it represents.
/// The heap-allocated state machine object.
- /// The argument was null (Nothing in Visual Basic).
+ /// The argument was null ( in Visual Basic).
/// The builder is incorrectly initialized.
public void SetStateMachine(IAsyncStateMachine stateMachine) =>
AsyncMethodBuilderCore.SetStateMachine(stateMachine, m_task);
@@ -496,7 +496,7 @@ internal static void SetExistingTaskResult(Task task, TResult? result)
/// Faulted state with the specified exception.
///
/// The to use to fault the task.
- /// The argument is null (Nothing in Visual Basic).
+ /// The argument is null ( in Visual Basic).
/// The task has already completed.
public void SetException(Exception exception) => SetException(exception, ref m_task);
diff --git a/src/libraries/System.Private.CoreLib/src/System/Runtime/CompilerServices/AsyncVoidMethodBuilder.cs b/src/libraries/System.Private.CoreLib/src/System/Runtime/CompilerServices/AsyncVoidMethodBuilder.cs
index 98b2a30fd52e9..c4719b8613277 100644
--- a/src/libraries/System.Private.CoreLib/src/System/Runtime/CompilerServices/AsyncVoidMethodBuilder.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/Runtime/CompilerServices/AsyncVoidMethodBuilder.cs
@@ -33,7 +33,7 @@ public static AsyncVoidMethodBuilder Create()
/// Initiates the builder's execution with the associated state machine.
/// Specifies the type of the state machine.
/// The state machine instance, passed by reference.
- /// The argument was null (Nothing in Visual Basic).
+ /// The argument was null ( in Visual Basic).
[DebuggerStepThrough]
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public void Start(ref TStateMachine stateMachine) where TStateMachine : IAsyncStateMachine =>
@@ -41,7 +41,7 @@ public void Start(ref TStateMachine stateMachine) where TStateMac
/// Associates the builder with the state machine it represents.
/// The heap-allocated state machine object.
- /// The argument was null (Nothing in Visual Basic).
+ /// The argument was null ( in Visual Basic).
/// The builder is incorrectly initialized.
public void SetStateMachine(IAsyncStateMachine stateMachine) =>
_builder.SetStateMachine(stateMachine);
@@ -92,7 +92,7 @@ public void SetResult()
/// Faults the method builder with an exception.
/// The exception that is the cause of this fault.
- /// The argument is null (Nothing in Visual Basic).
+ /// The argument is null ( in Visual Basic).
/// The builder is not initialized.
public void SetException(Exception exception)
{
diff --git a/src/libraries/System.Private.CoreLib/src/System/Runtime/CompilerServices/FixedBufferAttribute.cs b/src/libraries/System.Private.CoreLib/src/System/Runtime/CompilerServices/FixedBufferAttribute.cs
index baa6f6fa50bff..f3f96c2866861 100644
--- a/src/libraries/System.Private.CoreLib/src/System/Runtime/CompilerServices/FixedBufferAttribute.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/Runtime/CompilerServices/FixedBufferAttribute.cs
@@ -1,19 +1,11 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
-/*============================================================
-**
-**
-** Purpose: Used by a compiler for generating value types
-** in-place within other value types containing a certain
-** number of elements of the given (primitive) type. Somewhat
-** similar to P/Invoke's ByValTStr attribute.
-** Used by C# with this syntax: "fixed int buffer[10];"
-**
-===========================================================*/
-
namespace System.Runtime.CompilerServices
{
+ ///
+ /// Indicates that a field should be treated as containing a fixed number of elements of the specified primitive type.
+ ///
[AttributeUsage(AttributeTargets.Field, Inherited = false)]
public sealed class FixedBufferAttribute : Attribute
{
diff --git a/src/libraries/System.Private.CoreLib/src/System/Runtime/CompilerServices/FormattableStringFactory.cs b/src/libraries/System.Private.CoreLib/src/System/Runtime/CompilerServices/FormattableStringFactory.cs
index c475b165cd712..b45c9abc872cd 100644
--- a/src/libraries/System.Private.CoreLib/src/System/Runtime/CompilerServices/FormattableStringFactory.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/Runtime/CompilerServices/FormattableStringFactory.cs
@@ -1,21 +1,12 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
-/*============================================================
-**
-**
-**
-** Purpose: implementation of the FormattableStringFactory
-** class.
-**
-===========================================================*/
-
using System.Diagnostics.CodeAnalysis;
namespace System.Runtime.CompilerServices
{
///
- /// A factory type used by compilers to create instances of the type .
+ /// Provides a static method to create a object from a composite format string and its arguments.
///
public static class FormattableStringFactory
{
diff --git a/src/libraries/System.Private.CoreLib/src/System/Runtime/CompilerServices/INotifyCompletion.cs b/src/libraries/System.Private.CoreLib/src/System/Runtime/CompilerServices/INotifyCompletion.cs
index c61dd1b0c2f37..ff00892da828f 100644
--- a/src/libraries/System.Private.CoreLib/src/System/Runtime/CompilerServices/INotifyCompletion.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/Runtime/CompilerServices/INotifyCompletion.cs
@@ -17,7 +17,7 @@ public interface INotifyCompletion
{
/// Schedules the continuation action to be invoked when the instance completes.
/// The action to invoke when the operation completes.
- /// The argument is null (Nothing in Visual Basic).
+ /// The argument is null ( in Visual Basic).
void OnCompleted(Action continuation);
}
@@ -28,7 +28,7 @@ public interface ICriticalNotifyCompletion : INotifyCompletion
{
/// Schedules the continuation action to be invoked when the instance completes.
/// The action to invoke when the operation completes.
- /// The argument is null (Nothing in Visual Basic).
+ /// The argument is null ( in Visual Basic).
/// Unlike OnCompleted, UnsafeOnCompleted need not propagate ExecutionContext information.
void UnsafeOnCompleted(Action continuation);
}
diff --git a/src/libraries/System.Private.CoreLib/src/System/Runtime/CompilerServices/ReferenceAssemblyAttribute.cs b/src/libraries/System.Private.CoreLib/src/System/Runtime/CompilerServices/ReferenceAssemblyAttribute.cs
index 3a3d316cca41d..cb321a5e67daa 100644
--- a/src/libraries/System.Private.CoreLib/src/System/Runtime/CompilerServices/ReferenceAssemblyAttribute.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/Runtime/CompilerServices/ReferenceAssemblyAttribute.cs
@@ -1,19 +1,11 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
-/*============================================================
-**
-** Attribute: ReferenceAssemblyAttribute
-**
-** Purpose: Identifies an assembly as being a "reference
-** assembly", meaning it contains public surface area but
-** no usable implementation. Reference assemblies
-** should be loadable for introspection, but not execution.
-**
-============================================================*/
-
namespace System.Runtime.CompilerServices
{
+ ///
+ /// Identifies an assembly as a reference assembly, which contains metadata but no executable code.
+ ///
[AttributeUsage(AttributeTargets.Assembly, AllowMultiple = false)]
public sealed class ReferenceAssemblyAttribute : Attribute
{
diff --git a/src/libraries/System.Private.CoreLib/src/System/Runtime/CompilerServices/RuntimeCompatibilityAttribute.cs b/src/libraries/System.Private.CoreLib/src/System/Runtime/CompilerServices/RuntimeCompatibilityAttribute.cs
index c8b85bf0758ca..6d467244008bd 100644
--- a/src/libraries/System.Private.CoreLib/src/System/Runtime/CompilerServices/RuntimeCompatibilityAttribute.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/Runtime/CompilerServices/RuntimeCompatibilityAttribute.cs
@@ -1,17 +1,11 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
-/*=============================================================================
-**
-**
-**
-** Purpose: Mark up the program to indicate various legacy or new opt-in behaviors.
-**
-**
-=============================================================================*/
-
namespace System.Runtime.CompilerServices
{
+ ///
+ /// Specifies whether to enable various legacy or new opt-in behaviors.
+ ///
[AttributeUsage(AttributeTargets.Assembly, Inherited = false, AllowMultiple = false)]
public sealed class RuntimeCompatibilityAttribute : Attribute
{
diff --git a/src/libraries/System.Private.CoreLib/src/System/Runtime/CompilerServices/TaskAwaiter.cs b/src/libraries/System.Private.CoreLib/src/System/Runtime/CompilerServices/TaskAwaiter.cs
index 6279188504fbb..0e3f0ec71b6b9 100644
--- a/src/libraries/System.Private.CoreLib/src/System/Runtime/CompilerServices/TaskAwaiter.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/Runtime/CompilerServices/TaskAwaiter.cs
@@ -40,7 +40,7 @@ internal TaskAwaiter(Task task)
/// Schedules the continuation onto the associated with this .
/// The action to invoke when the await operation completes.
- /// The argument is null (Nothing in Visual Basic).
+ /// The argument is null ( in Visual Basic).
/// The awaiter was not properly initialized.
/// This method is intended for compiler use rather than use directly in code.
public void OnCompleted(Action continuation)
@@ -50,7 +50,7 @@ public void OnCompleted(Action continuation)
/// Schedules the continuation onto the associated with this .
/// The action to invoke when the await operation completes.
- /// The argument is null (Nothing in Visual Basic).
+ /// The argument is null ( in Visual Basic).
/// The awaiter was not properly initialized.
/// This method is intended for compiler use rather than use directly in code.
public void UnsafeOnCompleted(Action continuation)
@@ -168,7 +168,7 @@ private static void ThrowForNonSuccess(Task task)
/// The action to invoke when the await operation completes.
/// Whether to capture and marshal back to the current context.
/// Whether to flow ExecutionContext across the await.
- /// The argument is null (Nothing in Visual Basic).
+ /// The argument is null ( in Visual Basic).
/// The awaiter was not properly initialized.
/// This method is intended for compiler use rather than use directly in code.
internal static void OnCompletedInternal(Task task, Action continuation, bool continueOnCapturedContext, bool flowExecutionContext)
@@ -306,7 +306,7 @@ internal TaskAwaiter(Task task)
/// Schedules the continuation onto the associated with this .
/// The action to invoke when the await operation completes.
- /// The argument is null (Nothing in Visual Basic).
+ /// The argument is null ( in Visual Basic).
/// The awaiter was not properly initialized.
/// This method is intended for compiler use rather than use directly in code.
public void OnCompleted(Action continuation)
@@ -316,7 +316,7 @@ public void OnCompleted(Action continuation)
/// Schedules the continuation onto the associated with this .
/// The action to invoke when the await operation completes.
- /// The argument is null (Nothing in Visual Basic).
+ /// The argument is null ( in Visual Basic).
/// The awaiter was not properly initialized.
/// This method is intended for compiler use rather than use directly in code.
public void UnsafeOnCompleted(Action continuation)
@@ -404,7 +404,7 @@ internal ConfiguredTaskAwaiter(Task task, ConfigureAwaitOptions options)
/// Schedules the continuation onto the associated with this .
/// The action to invoke when the await operation completes.
- /// The argument is null (Nothing in Visual Basic).
+ /// The argument is null ( in Visual Basic).
/// The awaiter was not properly initialized.
/// This method is intended for compiler use rather than use directly in code.
public void OnCompleted(Action continuation)
@@ -414,7 +414,7 @@ public void OnCompleted(Action continuation)
/// Schedules the continuation onto the associated with this .
/// The action to invoke when the await operation completes.
- /// The argument is null (Nothing in Visual Basic).
+ /// The argument is null ( in Visual Basic).
/// The awaiter was not properly initialized.
/// This method is intended for compiler use rather than use directly in code.
public void UnsafeOnCompleted(Action continuation)
@@ -486,7 +486,7 @@ internal ConfiguredTaskAwaiter(Task task, ConfigureAwaitOptions options
/// Schedules the continuation onto the associated with this .
/// The action to invoke when the await operation completes.
- /// The argument is null (Nothing in Visual Basic).
+ /// The argument is null ( in Visual Basic).
/// The awaiter was not properly initialized.
/// This method is intended for compiler use rather than use directly in code.
public void OnCompleted(Action continuation)
@@ -496,7 +496,7 @@ public void OnCompleted(Action continuation)
/// Schedules the continuation onto the associated with this .
/// The action to invoke when the await operation completes.
- /// The argument is null (Nothing in Visual Basic).
+ /// The argument is null ( in Visual Basic).
/// The awaiter was not properly initialized.
/// This method is intended for compiler use rather than use directly in code.
public void UnsafeOnCompleted(Action continuation)
diff --git a/src/libraries/System.Private.CoreLib/src/System/Runtime/CompilerServices/YieldAwaitable.cs b/src/libraries/System.Private.CoreLib/src/System/Runtime/CompilerServices/YieldAwaitable.cs
index 2a42c88c41d96..d9bea6410babb 100644
--- a/src/libraries/System.Private.CoreLib/src/System/Runtime/CompilerServices/YieldAwaitable.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/Runtime/CompilerServices/YieldAwaitable.cs
@@ -51,7 +51,7 @@ public readonly struct YieldAwaitable
/// Posts the back to the current context.
/// The action to invoke asynchronously.
- /// The argument is null (Nothing in Visual Basic).
+ /// The argument is null ( in Visual Basic).
public void OnCompleted(Action continuation)
{
QueueContinuation(continuation, flowContext: true);
@@ -59,7 +59,7 @@ public void OnCompleted(Action continuation)
/// Posts the back to the current context.
/// The action to invoke asynchronously.
- /// The argument is null (Nothing in Visual Basic).
+ /// The argument is null ( in Visual Basic).
public void UnsafeOnCompleted(Action continuation)
{
QueueContinuation(continuation, flowContext: false);
@@ -68,7 +68,7 @@ public void UnsafeOnCompleted(Action continuation)
/// Posts the back to the current context.
/// The action to invoke asynchronously.
/// true to flow ExecutionContext; false if flowing is not required.
- /// The argument is null (Nothing in Visual Basic).
+ /// The argument is null ( in Visual Basic).
private static void QueueContinuation(Action continuation, bool flowContext)
{
ArgumentNullException.ThrowIfNull(continuation);
diff --git a/src/libraries/System.Private.CoreLib/src/System/Runtime/ConstrainedExecution/CriticalFinalizerObject.cs b/src/libraries/System.Private.CoreLib/src/System/Runtime/ConstrainedExecution/CriticalFinalizerObject.cs
index 61d9f48d1ff55..01be4f8c87efe 100644
--- a/src/libraries/System.Private.CoreLib/src/System/Runtime/ConstrainedExecution/CriticalFinalizerObject.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/Runtime/ConstrainedExecution/CriticalFinalizerObject.cs
@@ -1,20 +1,13 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
-/*============================================================
-**
-**
-** Deriving from this class will cause any finalizer you define to be critical
-** (i.e. the finalizer is guaranteed to run, won't be aborted by the host and is
-** run after the finalizers of other objects collected at the same time).
-**
-**
-===========================================================*/
-
using System.Diagnostics.CodeAnalysis;
namespace System.Runtime.ConstrainedExecution
{
+ ///
+ /// Ensures that all finalization code in derived classes is marked as critical.
+ ///
public abstract class CriticalFinalizerObject
{
protected CriticalFinalizerObject()
diff --git a/src/libraries/System.Private.CoreLib/src/System/Runtime/ConstrainedExecution/ReliabilityContractAttribute.cs b/src/libraries/System.Private.CoreLib/src/System/Runtime/ConstrainedExecution/ReliabilityContractAttribute.cs
index 2b0fbd279a173..ec3fd823a1d9e 100644
--- a/src/libraries/System.Private.CoreLib/src/System/Runtime/ConstrainedExecution/ReliabilityContractAttribute.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/Runtime/ConstrainedExecution/ReliabilityContractAttribute.cs
@@ -1,22 +1,11 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
-//
-/*============================================================
-**
-**
-**
-** Purpose: Defines a publicly documentable contract for
-** reliability between a method and its callers, expressing
-** what state will remain consistent in the presence of
-** failures (ie async exceptions like thread abort) and whether
-** the method needs to be called from within a CER.
-**
-**
-===========================================================*/
-
namespace System.Runtime.ConstrainedExecution
{
+ ///
+ /// Defines a contract for reliability between the author of some code, and the developers who have a dependency on that code.
+ ///
[Obsolete(Obsoletions.ConstrainedExecutionRegionMessage, DiagnosticId = Obsoletions.ConstrainedExecutionRegionDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
[AttributeUsage(AttributeTargets.Assembly | AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Constructor | AttributeTargets.Method | AttributeTargets.Interface /* | AttributeTargets.Delegate*/, Inherited = false)]
public sealed class ReliabilityContractAttribute : Attribute
diff --git a/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/ExternalException.cs b/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/ExternalException.cs
index 0c08ee31fe9c6..6f148661d849e 100644
--- a/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/ExternalException.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/ExternalException.cs
@@ -1,24 +1,15 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
-/*=============================================================================
-**
-**
-**
-** Purpose: Exception base class for all errors from Interop or Structured
-** Exception Handling code.
-**
-**
-=============================================================================*/
-
using System.ComponentModel;
using System.Runtime.CompilerServices;
using System.Runtime.Serialization;
namespace System.Runtime.InteropServices
{
- // Base exception for COM Interop errors &; Structured Exception Handler
- // exceptions.
+ ///
+ /// The base exception type for all COM interop exceptions and structured exception handling (SEH) exceptions.
+ ///
[Serializable]
[TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
public class ExternalException : SystemException
diff --git a/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/MarshalDirectiveException.cs b/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/MarshalDirectiveException.cs
index a5f4c45801f55..d6f2a78cdfa74 100644
--- a/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/MarshalDirectiveException.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices/MarshalDirectiveException.cs
@@ -1,21 +1,15 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
-/*=============================================================================
-**
-**
-** Purpose: This exception is thrown when the marshaller encounters a signature
-** that has an invalid MarshalAs CA for a given argument or is not
-** supported.
-**
-=============================================================================*/
-
using System.ComponentModel;
using System.Runtime.CompilerServices;
using System.Runtime.Serialization;
namespace System.Runtime.InteropServices
{
+ ///
+ /// The exception that is thrown by the marshaler when it encounters a it does not support.
+ ///
[Serializable]
[TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
public class MarshalDirectiveException : SystemException
diff --git a/src/libraries/System.Private.CoreLib/src/System/Runtime/Versioning/TargetFrameworkAttribute.cs b/src/libraries/System.Private.CoreLib/src/System/Runtime/Versioning/TargetFrameworkAttribute.cs
index 410be22aff2de..45ecc4f46ac3f 100644
--- a/src/libraries/System.Private.CoreLib/src/System/Runtime/Versioning/TargetFrameworkAttribute.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/Runtime/Versioning/TargetFrameworkAttribute.cs
@@ -1,18 +1,11 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
-/*============================================================
-**
-**
-**
-** Purpose: Identifies which SKU and version of the .NET
-** Framework that a particular library was compiled against.
-** Emitted by VS, and can help catch deployment problems.
-**
-===========================================================*/
-
namespace System.Runtime.Versioning
{
+ ///
+ /// Identifies the version of .NET that a particular assembly was compiled against.
+ ///
[AttributeUsage(AttributeTargets.Assembly, AllowMultiple = false, Inherited = false)]
public sealed class TargetFrameworkAttribute : Attribute
{
diff --git a/src/libraries/System.Private.CoreLib/src/System/Single.cs b/src/libraries/System.Private.CoreLib/src/System/Single.cs
index 42f5861c3be71..273576e36a4dd 100644
--- a/src/libraries/System.Private.CoreLib/src/System/Single.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/Single.cs
@@ -1,15 +1,6 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
-/*============================================================
-**
-**
-**
-** Purpose: A wrapper class for the primitive type float.
-**
-**
-===========================================================*/
-
using System.Buffers.Binary;
using System.Diagnostics;
using System.Diagnostics.CodeAnalysis;
@@ -21,6 +12,9 @@
namespace System
{
+ ///
+ /// Represents a single-precision floating-point number.
+ ///
[Serializable]
[StructLayout(LayoutKind.Sequential)]
[TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
diff --git a/src/libraries/System.Private.CoreLib/src/System/StackOverflowException.cs b/src/libraries/System.Private.CoreLib/src/System/StackOverflowException.cs
index e1daed4e8ed51..9d0b2ed65b56c 100644
--- a/src/libraries/System.Private.CoreLib/src/System/StackOverflowException.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/StackOverflowException.cs
@@ -1,20 +1,14 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
-/*=============================================================================
-**
-**
-**
-** Purpose: The exception class for stack overflow.
-**
-**
-=============================================================================*/
-
using System.Runtime.CompilerServices;
using System.Runtime.Serialization;
namespace System
{
+ ///
+ /// Exception thrown on a stack overflow.
+ ///
[Serializable]
[TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
public sealed class StackOverflowException : SystemException
diff --git a/src/libraries/System.Private.CoreLib/src/System/ThreadAttributes.cs b/src/libraries/System.Private.CoreLib/src/System/ThreadAttributes.cs
index 9e51f44f98c50..0ec0ac3dd359b 100644
--- a/src/libraries/System.Private.CoreLib/src/System/ThreadAttributes.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/ThreadAttributes.cs
@@ -1,14 +1,11 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
-/*=============================================================================
-**
-** Purpose: For Threads-related custom attributes.
-**
-=============================================================================*/
-
namespace System
{
+ ///
+ /// Indicates that the COM threading model for an application is single-threaded apartment (STA).
+ ///
[AttributeUsage(AttributeTargets.Method)]
public sealed class STAThreadAttribute : Attribute
{
@@ -17,6 +14,9 @@ public STAThreadAttribute()
}
}
+ ///
+ /// Indicates that the COM threading model for an application is multi-threaded apartment (MTA).
+ ///
[AttributeUsage(AttributeTargets.Method)]
public sealed class MTAThreadAttribute : Attribute
{
diff --git a/src/libraries/System.Private.CoreLib/src/System/ThreadStaticAttribute.cs b/src/libraries/System.Private.CoreLib/src/System/ThreadStaticAttribute.cs
index 31e81b4b79bf2..4355dfa199fd3 100644
--- a/src/libraries/System.Private.CoreLib/src/System/ThreadStaticAttribute.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/ThreadStaticAttribute.cs
@@ -1,19 +1,11 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
-/*============================================================
-**
-**
-**
-** Purpose: Custom attribute to indicate that the field should be treated
-** as a static relative to a thread.
-**
-**
-**
-===========================================================*/
-
namespace System
{
+ ///
+ /// Indicates that the value of a static field is unique for each thread.
+ ///
[AttributeUsage(AttributeTargets.Field, Inherited = false)]
public class ThreadStaticAttribute : Attribute
{
diff --git a/src/libraries/System.Private.CoreLib/src/System/Threading/EventResetMode.cs b/src/libraries/System.Private.CoreLib/src/System/Threading/EventResetMode.cs
index cf84907751140..04ce1fe76000a 100644
--- a/src/libraries/System.Private.CoreLib/src/System/Threading/EventResetMode.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/Threading/EventResetMode.cs
@@ -1,18 +1,11 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
-/*=============================================================================
-**
-** Enum: EventResetMode
-**
-**
-** Purpose: Enum to determine the Event type to create
-**
-**
-=============================================================================*/
-
namespace System.Threading
{
+ ///
+ /// Indicates whether an is reset automatically or manually after receiving a signal.
+ ///
public enum EventResetMode
{
AutoReset = 0,
diff --git a/src/libraries/System.Private.CoreLib/src/System/Threading/ExecutionContext.cs b/src/libraries/System.Private.CoreLib/src/System/Threading/ExecutionContext.cs
index bbc7631a61694..986ea1bd62ce9 100644
--- a/src/libraries/System.Private.CoreLib/src/System/Threading/ExecutionContext.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/Threading/ExecutionContext.cs
@@ -1,15 +1,6 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
-/*============================================================
-**
-**
-**
-** Purpose: Capture execution context for a thread
-**
-**
-===========================================================*/
-
using System.ComponentModel;
using System.Diagnostics;
using System.Diagnostics.CodeAnalysis;
@@ -23,6 +14,9 @@ namespace System.Threading
internal delegate void ContextCallback(ref TState state);
+ ///
+ /// Manages the execution context for the current thread.
+ ///
public sealed class ExecutionContext : IDisposable, ISerializable
{
internal static readonly ExecutionContext Default = new ExecutionContext();
diff --git a/src/libraries/System.Private.CoreLib/src/System/Threading/LazyInitializer.cs b/src/libraries/System.Private.CoreLib/src/System/Threading/LazyInitializer.cs
index 55186b542c958..76677a7de21af 100644
--- a/src/libraries/System.Private.CoreLib/src/System/Threading/LazyInitializer.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/Threading/LazyInitializer.cs
@@ -88,7 +88,7 @@ public static class LazyInitializer
///
///
/// This method may only be used on reference types, and may
- /// not return a null reference (Nothing in Visual Basic). To ensure initialization of value types or
+ /// not return a null reference ( in Visual Basic). To ensure initialization of value types or
/// to allow null reference types, see other overloads of EnsureInitialized.
///
///
diff --git a/src/libraries/System.Private.CoreLib/src/System/Threading/ParameterizedThreadStart.cs b/src/libraries/System.Private.CoreLib/src/System/Threading/ParameterizedThreadStart.cs
index 1b0aa56d9762b..d3b13bc3c2564 100644
--- a/src/libraries/System.Private.CoreLib/src/System/Threading/ParameterizedThreadStart.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/Threading/ParameterizedThreadStart.cs
@@ -1,17 +1,10 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
-/*=============================================================================
-**
-**
-**
-** Purpose: This class is a Delegate which defines the start method
-** for starting a thread. That method must match this delegate.
-**
-**
-=============================================================================*/
-
namespace System.Threading
{
+ ///
+ /// Represents the method that executes on a .
+ ///
public delegate void ParameterizedThreadStart(object? obj);
}
diff --git a/src/libraries/System.Private.CoreLib/src/System/Threading/SynchronizationLockException.cs b/src/libraries/System.Private.CoreLib/src/System/Threading/SynchronizationLockException.cs
index b89d6fbb4b3ad..158a3fdb3ab7d 100644
--- a/src/libraries/System.Private.CoreLib/src/System/Threading/SynchronizationLockException.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/Threading/SynchronizationLockException.cs
@@ -1,22 +1,15 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
-/*=============================================================================
-**
-**
-**
-** Purpose: Wait(), Notify() or NotifyAll() was called from an unsynchronized
-** block of code.
-**
-**
-=============================================================================*/
-
using System.ComponentModel;
using System.Runtime.CompilerServices;
using System.Runtime.Serialization;
namespace System.Threading
{
+ ///
+ /// The exception that is thrown when a method requires the caller to own the lock on a given Monitor, and the method is invoked by a caller that does not own that lock.
+ ///
[Serializable]
[TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
public class SynchronizationLockException : SystemException
diff --git a/src/libraries/System.Private.CoreLib/src/System/Threading/ThreadAbortException.cs b/src/libraries/System.Private.CoreLib/src/System/Threading/ThreadAbortException.cs
index b20c3e90b19a6..919e157b5573e 100644
--- a/src/libraries/System.Private.CoreLib/src/System/Threading/ThreadAbortException.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/Threading/ThreadAbortException.cs
@@ -1,23 +1,14 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
-/*=============================================================================
-**
-**
-**
-** Purpose: An exception class which is thrown into a thread to cause it to
-** abort. This is a special non-catchable exception and results in
-** the thread's death. This is thrown by the VM only and can NOT be
-** thrown by any user thread, and subclassing this is useless.
-**
-**
-=============================================================================*/
-
using System.Runtime.CompilerServices;
using System.Runtime.Serialization;
namespace System.Threading
{
+ ///
+ /// The exception that is thrown when a call is made to the method.
+ ///
[Serializable]
[TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
public sealed class ThreadAbortException : SystemException
diff --git a/src/libraries/System.Private.CoreLib/src/System/Threading/ThreadLocal.cs b/src/libraries/System.Private.CoreLib/src/System/Threading/ThreadLocal.cs
index fd8584b22c0eb..7099c45045bf9 100644
--- a/src/libraries/System.Private.CoreLib/src/System/Threading/ThreadLocal.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/Threading/ThreadLocal.cs
@@ -87,7 +87,7 @@ public ThreadLocal(bool trackAllValues)
/// an attempt is made to retrieve without it having been previously initialized.
///
///
- /// is a null reference (Nothing in Visual Basic).
+ /// is a null reference ( in Visual Basic).
///
public ThreadLocal(Func valueFactory)
{
@@ -106,7 +106,7 @@ public ThreadLocal(Func valueFactory)
///
/// Whether to track all values set on the instance and expose them via the Values property.
///
- /// is a null reference (Nothing in Visual Basic).
+ /// is a null reference ( in Visual Basic).
///
public ThreadLocal(Func valueFactory, bool trackAllValues)
{
@@ -207,7 +207,7 @@ protected virtual void Dispose(bool disposing)
/// Creates and returns a string representation of this instance for the current thread.
/// The result of calling on the .
///
- /// The for the current thread is a null reference (Nothing in Visual Basic).
+ /// The for the current thread is a null reference ( in Visual Basic).
///
///
/// The initialization function referenced in an improper manner.
diff --git a/src/libraries/System.Private.CoreLib/src/System/Threading/ThreadPoolWorkQueue.cs b/src/libraries/System.Private.CoreLib/src/System/Threading/ThreadPoolWorkQueue.cs
index afdb8fb7d6bc6..9e4a2420c7edb 100644
--- a/src/libraries/System.Private.CoreLib/src/System/Threading/ThreadPoolWorkQueue.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/Threading/ThreadPoolWorkQueue.cs
@@ -1,15 +1,6 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
-/*=============================================================================
-**
-**
-**
-** Purpose: Class for creating and managing a threadpool
-**
-**
-=============================================================================*/
-
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Diagnostics;
@@ -22,6 +13,9 @@
namespace System.Threading
{
+ ///
+ /// Class for creating and managing a threadpool.
+ ///
internal sealed partial class ThreadPoolWorkQueue
{
internal static class WorkStealingQueueList
diff --git a/src/libraries/System.Private.CoreLib/src/System/Threading/ThreadStart.cs b/src/libraries/System.Private.CoreLib/src/System/Threading/ThreadStart.cs
index 67f46b8479d35..d9e9902750877 100644
--- a/src/libraries/System.Private.CoreLib/src/System/Threading/ThreadStart.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/Threading/ThreadStart.cs
@@ -1,17 +1,10 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
-/*=============================================================================
-**
-**
-**
-** Purpose: This class is a Delegate which defines the start method
-** for starting a thread. That method must match this delegate.
-**
-**
-=============================================================================*/
-
namespace System.Threading
{
+ ///
+ /// Represents the method that executes on a .
+ ///
public delegate void ThreadStart();
}
diff --git a/src/libraries/System.Private.CoreLib/src/System/Threading/ThreadStateException.cs b/src/libraries/System.Private.CoreLib/src/System/Threading/ThreadStateException.cs
index 20bd715c20145..81118f6dee0ed 100644
--- a/src/libraries/System.Private.CoreLib/src/System/Threading/ThreadStateException.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/Threading/ThreadStateException.cs
@@ -1,22 +1,15 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
-/*=============================================================================
-**
-**
-**
-** Purpose: An exception class to indicate that the Thread class is in an
-** invalid state for the method.
-**
-**
-=============================================================================*/
-
using System.ComponentModel;
using System.Runtime.CompilerServices;
using System.Runtime.Serialization;
namespace System.Threading
{
+ ///
+ /// The exception that is thrown when a is in an invalid for the method call.
+ ///
[Serializable]
[TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
public class ThreadStateException : SystemException
diff --git a/src/libraries/System.Private.CoreLib/src/System/TimeZone.cs b/src/libraries/System.Private.CoreLib/src/System/TimeZone.cs
index 4a572bd986f6f..c2f519c31a570 100644
--- a/src/libraries/System.Private.CoreLib/src/System/TimeZone.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/TimeZone.cs
@@ -1,27 +1,14 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
-/*============================================================
-**
-**
-**
-** Purpose:
-** This class is used to represent a TimeZone. It
-** has methods for converting a DateTime to UTC from local time
-** and to local time from UTC and methods for getting the
-** standard name and daylight name of the time zone.
-**
-** The only TimeZone that we support in version 1 is the
-** CurrentTimeZone as determined by the system timezone.
-**
-**
-============================================================*/
-
using System.Threading;
using System.Globalization;
namespace System
{
+ ///
+ /// Represents a time zone.
+ ///
[Obsolete("System.TimeZone has been deprecated. Investigate the use of System.TimeZoneInfo instead.")]
public abstract class TimeZone
{
diff --git a/src/libraries/System.Private.CoreLib/src/System/TimeoutException.cs b/src/libraries/System.Private.CoreLib/src/System/TimeoutException.cs
index 2ff38e5abbe53..29f6155094e03 100644
--- a/src/libraries/System.Private.CoreLib/src/System/TimeoutException.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/TimeoutException.cs
@@ -1,21 +1,15 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
-/*=============================================================================
-**
-**
-**
-** Purpose: Exception class for Timeout
-**
-**
-=============================================================================*/
-
using System.ComponentModel;
using System.Runtime.CompilerServices;
using System.Runtime.Serialization;
namespace System
{
+ ///
+ /// The exception that is thrown when the time allotted for a process or operation has expired.
+ ///
[Serializable]
[TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
public class TimeoutException : SystemException
diff --git a/src/libraries/System.Private.CoreLib/src/System/TypeInitializationException.cs b/src/libraries/System.Private.CoreLib/src/System/TypeInitializationException.cs
index 97efd804c3c8b..99994113a0d55 100644
--- a/src/libraries/System.Private.CoreLib/src/System/TypeInitializationException.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/TypeInitializationException.cs
@@ -1,24 +1,15 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
-/*=============================================================================
-**
-**
-**
-** Purpose: The exception class to wrap exceptions thrown by
-** a type's class initializer (.cctor). This is sufficiently
-** distinct from a TypeLoadException, which means we couldn't
-** find the type.
-**
-**
-=============================================================================*/
-
using System.ComponentModel;
using System.Runtime.CompilerServices;
using System.Runtime.Serialization;
namespace System
{
+ ///
+ /// The exception that is thrown as a wrapper around the exception thrown by the class initializer.
+ ///
[Serializable]
[TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
public sealed class TypeInitializationException : SystemException
diff --git a/src/libraries/System.Private.CoreLib/src/System/UnauthorizedAccessException.cs b/src/libraries/System.Private.CoreLib/src/System/UnauthorizedAccessException.cs
index 395c578f19279..88d89e1fee271 100644
--- a/src/libraries/System.Private.CoreLib/src/System/UnauthorizedAccessException.cs
+++ b/src/libraries/System.Private.CoreLib/src/System/UnauthorizedAccessException.cs
@@ -1,25 +1,15 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
-/*============================================================
-**
-**
-**
-** Purpose: An exception for OS 'access denied' types of
-** errors, including IO and limited security types
-** of errors.
-**
-**
-===========================================================*/
-
using System.ComponentModel;
using System.Runtime.CompilerServices;
using System.Runtime.Serialization;
namespace System
{
- // The UnauthorizedAccessException is thrown when access errors
- // occur from IO or other OS methods.
+ ///
+ /// The exception that is thrown when the operating system denies access because of an I/O error or a specific type of security error.
+ ///
[Serializable]
[TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
public class UnauthorizedAccessException : SystemException