diff --git a/source/System/Array.cs b/source/System/Array.cs index 6e9607c6..b18df2cc 100644 --- a/source/System/Array.cs +++ b/source/System/Array.cs @@ -51,7 +51,7 @@ public static void Copy(Array sourceArray, Array destinationArray, int length) public static extern void Copy(Array sourceArray, int sourceIndex, Array destinationArray, int destinationIndex, int length); /// - /// Sets a range of elements in the Array to zero, to false, or to nullNothingnullptrunita null reference (Nothing in Visual Basic), depending on the element type. + /// Sets a range of elements in the Array to zero, to false, or to null reference (Nothing in Visual Basic), depending on the element type. /// /// The Array whose elements need to be cleared. /// The starting index of the range of elements to clear. @@ -177,6 +177,10 @@ void IList.RemoveAt(int index) throw new NotSupportedException(); } + /// + /// Creates a shallow copy of the . + /// + /// A shallow copy of the . public Object Clone() { var length = Length; @@ -211,7 +215,7 @@ public static int BinarySearch(Array array, Object value, IComparer comparer) /// -or- /// nullNothingnullptrunit a null reference(Nothing in Visual Basic) to use the IComparable implementation of each element. /// The index of the specified value in the specified array, if value is found. If value is not found and value is less than one or more elements in array, a negative number which is the bitwise complement of the index of the first element that is larger than value. If value is not found and value is greater than any of the elements in array, a negative number which is the bitwise complement of (the index of the last element plus 1). - /// comparer is nullNothingnullptrunita null reference (Nothing in Visual Basic), value does not implement the IComparable interface, and the search encounters an element that does not implement the IComparable interface. + /// comparer is null reference (Nothing in Visual Basic), value does not implement the IComparable interface, and the search encounters an element that does not implement the IComparable interface. public static int BinarySearch(Array array, int index, int length, Object value, IComparer comparer) { var lo = index; diff --git a/source/System/Byte.cs b/source/System/Byte.cs index 56325c89..1c6aadfe 100644 --- a/source/System/Byte.cs +++ b/source/System/Byte.cs @@ -50,7 +50,7 @@ public String ToString(String format) /// /// A string that contains a number to convert. The string is interpreted using the Integer style. /// A byte value that is equivalent to the number contained in s. - /// s is nullNothingnullptrunita null reference (Nothing in Visual Basic). + /// s is null reference (Nothing in Visual Basic). [CLSCompliant(false)] public static byte Parse(String s) { diff --git a/source/System/Collections/ArrayList.cs b/source/System/Collections/ArrayList.cs index 790564e3..109b218c 100644 --- a/source/System/Collections/ArrayList.cs +++ b/source/System/Collections/ArrayList.cs @@ -23,7 +23,7 @@ public class ArrayList : IList, ICloneable private const int DefaultCapacity = 4; /// - /// Initializes a new instance of the ArrayList class that is empty and has the default initial capacity. + /// Initializes a new instance of the class that is empty and has the default initial capacity. /// public ArrayList() { @@ -31,10 +31,10 @@ public ArrayList() } /// - /// Gets or sets the number of elements that the ArrayList can contain. + /// Gets or sets the number of elements that the can contain. /// /// - /// The number of elements that the ArrayList can contain. + /// The number of elements that the can contain. /// public virtual int Capacity { @@ -49,10 +49,10 @@ public virtual int Capacity private extern void SetCapacity(int capacity); /// - /// Gets the number of elements actually contained in the ArrayList. + /// Gets the number of elements actually contained in the . /// /// - /// The number of elements actually contained in the ArrayList. + /// The number of elements actually contained in the . /// public virtual int Count { @@ -60,10 +60,10 @@ public virtual int Count } /// - /// Gets a value indicating whether the ArrayList has a fixed size. + /// Gets a value indicating whether the has a fixed size. /// /// - /// true if the ArrayList has a fixed size; otherwise, false. The default is false. + /// true if the has a fixed size; otherwise, false. The default is false. /// public virtual bool IsFixedSize { @@ -71,10 +71,10 @@ public virtual bool IsFixedSize } /// - /// Gets a value indicating whether the ArrayList is read-only. + /// Gets a value indicating whether the is read-only. /// /// - /// true if the ArrayList is read-only; otherwise, false. The default is false. + /// true if the is read-only; otherwise, false. The default is false. /// public virtual bool IsReadOnly { @@ -82,10 +82,10 @@ public virtual bool IsReadOnly } /// - /// Gets a value indicating whether access to the ArrayList is synchronized (thread safe). + /// Gets a value indicating whether access to the is synchronized (thread safe). /// /// - /// true if access to the ArrayList is synchronized (thread safe); otherwise, false. The default is false. + /// true if access to the is synchronized (thread safe); otherwise, false. The default is false. /// public virtual bool IsSynchronized { @@ -93,16 +93,21 @@ public virtual bool IsSynchronized } /// - /// Gets an object that can be used to synchronize access to the ArrayList. + /// Gets an object that can be used to synchronize access to the . /// /// - /// An object that can be used to synchronize access to the ArrayList. + /// An object that can be used to synchronize access to the . /// public virtual Object SyncRoot { get { return this; } } + /// + /// Gets or sets the element at the specified index. + /// + /// The zero-based index of the element to get or set. + /// public virtual extern Object this[int index] { [MethodImpl(MethodImplOptions.InternalCall)] @@ -112,25 +117,37 @@ public virtual extern Object this[int index] set; } + /// + /// Adds an object to the end of the . + /// + /// + /// The to be added to the end of the . The value can be . [MethodImpl(MethodImplOptions.InternalCall)] public virtual extern int Add(Object value); /// - /// Searches the entire sorted ArrayList for an element using the specified comparer and returns the zero-based index of the element. + /// Searches the entire sorted for an element using the specified comparer and returns the zero-based index of the element. /// - /// The Object to locate. The value can be nullNothingnullptrunita null reference (Nothing in Visual Basic). + /// The Object to locate. The value can be reference (Nothing in Visual Basic). /// The IComparer implementation to use when comparing elements. /// -or- - /// nullNothingnullptrunit a null reference(Nothing in Visual Basic) to use the IComparable implementation of each element. - /// The zero-based index of value in the sorted ArrayList, if value is found; otherwise, a negative number, which is the bitwise complement of the index of the next element that is larger than value or, if there is no larger element, the bitwise complement of Count. + /// nullNothingnullptrunit a reference(Nothing in Visual Basic) to use the IComparable implementation of each element. + /// The zero-based index of value in the sorted , if value is found; otherwise, a negative number, which is the bitwise complement of the index of the next element that is larger than value or, if there is no larger element, the bitwise complement of Count. public virtual int BinarySearch(Object value, IComparer comparer) { return Array.BinarySearch(_items, 0, _size, value, comparer); } + /// + /// Removes all elements from the . + /// [MethodImpl(MethodImplOptions.InternalCall)] public virtual extern void Clear(); + /// + /// Creates a shallow copy of the . + /// + /// A shallow copy of the . public virtual Object Clone() { var arrayList = new ArrayList(); @@ -147,24 +164,29 @@ public virtual Object Clone() return arrayList; } + /// + /// Determines whether an element is in the . + /// + /// + /// The to locate in the .The value can be . public virtual bool Contains(Object item) { return Array.IndexOf(_items, item, 0, _size) >= 0; } /// - /// Copies the entire ArrayList to a compatible one-dimensional Array, starting at the beginning of the target array. + /// Copies the entire to a compatible one-dimensional Array, starting at the beginning of the target array. /// - /// The one-dimensional Array that is the destination of the elements copied from ArrayList. The Array must have zero-based indexing. + /// The one-dimensional Array that is the destination of the elements copied from . The Array must have zero-based indexing. public virtual void CopyTo(Array array) { CopyTo(array, 0); } /// - /// Copies the entire ArrayList to a compatible one-dimensional Array, starting at the specified index of the target array. + /// Copies the entire to a compatible one-dimensional Array, starting at the specified index of the target array. /// - /// The one-dimensional Array that is the destination of the elements copied from ArrayList. The Array must have zero-based indexing. + /// The one-dimensional Array that is the destination of the elements copied from . The Array must have zero-based indexing. /// The zero-based index in array at which copying begins. public virtual void CopyTo(Array array, int arrayIndex) { @@ -172,50 +194,59 @@ public virtual void CopyTo(Array array, int arrayIndex) } /// - /// Returns an enumerator for the entire ArrayList. + /// Returns an enumerator for the entire . /// - /// An IEnumerator for the entire ArrayList. + /// An IEnumerator for the entire . public virtual IEnumerator GetEnumerator() { return new Array.SzArrayEnumerator(_items, 0, _size); } /// - /// Searches for the specified Object and returns the zero-based index of the first occurrence within the entire ArrayList. + /// Searches for the specified Object and returns the zero-based index of the first occurrence within the entire . /// - /// The Object to locate in the ArrayList. The value can be nullNothingnullptrunita null reference (Nothing in Visual Basic). - /// The zero-based index of the first occurrence of value within the entire ArrayList, if found; otherwise, -1. + /// The Object to locate in the . The value can be reference (Nothing in Visual Basic). + /// The zero-based index of the first occurrence of value within the entire , if found; otherwise, -1. public virtual int IndexOf(Object value) { return Array.IndexOf(_items, value, 0, _size); } /// - /// Searches for the specified Object and returns the zero-based index of the first occurrence within the range of elements in the ArrayList that extends from the specified index to the last element. + /// Searches for the specified Object and returns the zero-based index of the first occurrence within the range of elements in the that extends from the specified index to the last element. /// - /// The Object to locate in the ArrayList. The value can be nullNothingnullptrunita null reference (Nothing in Visual Basic). + /// The Object to locate in the . The value can be reference (Nothing in Visual Basic). /// The zero-based starting index of the search. 0 (zero) is valid in an empty list. - /// The zero-based index of the first occurrence of value within the range of elements in the ArrayList that extends from startIndex to the last element, if found; otherwise, -1. + /// The zero-based index of the first occurrence of value within the range of elements in the that extends from startIndex to the last element, if found; otherwise, -1. public virtual int IndexOf(Object value, int startIndex) { return Array.IndexOf(_items, value, startIndex, _size - startIndex); } /// - /// Searches for the specified Object and returns the zero-based index of the first occurrence within the range of elements in the ArrayList that starts at the specified index and contains the specified number of elements. + /// Searches for the specified Object and returns the zero-based index of the first occurrence within the range of elements in the that starts at the specified index and contains the specified number of elements. /// - /// The Object to locate in the ArrayList. The value can be nullNothingnullptrunita null reference (Nothing in Visual Basic). + /// The Object to locate in the . The value can be reference (Nothing in Visual Basic). /// The zero-based starting index of the search. 0 (zero) is valid in an empty list. /// The number of elements in the section to search. - /// The zero-based index of the first occurrence of value within the range of elements in the ArrayList that starts at startIndex and contains count number of elements, if found; otherwise, -1. + /// The zero-based index of the first occurrence of value within the range of elements in the that starts at startIndex and contains count number of elements, if found; otherwise, -1. public virtual int IndexOf(Object value, int startIndex, int count) { return Array.IndexOf(_items, value, startIndex, count); } + /// + /// Inserts an element into the at the specified index. + /// + /// The zero-based index at which value should be inserted. + /// The to insert. The `value` can be . [MethodImpl(MethodImplOptions.InternalCall)] public virtual extern void Insert(int index, Object value); + /// + /// Removes the first occurrence of a specific object from the . + /// + /// The to remove from the . The value can be . public virtual void Remove(Object obj) { var index = Array.IndexOf(_items, obj, 0, _size); @@ -225,23 +256,27 @@ public virtual void Remove(Object obj) } } + /// + /// Removes the element at the specified index of the . + /// + /// The zero-based index of the element to remove. [MethodImpl(MethodImplOptions.InternalCall)] public virtual extern void RemoveAt(int index); /// - /// Copies the elements of the ArrayList to a new Object array. + /// Copies the elements of the to a new array. /// - /// An Object array containing copies of the elements of the ArrayList. + /// An Object array containing copies of the elements of the . public virtual Object[] ToArray() { return (Object[])ToArray(typeof(object)); } /// - /// Copies the elements of the ArrayList to a new array of the specified element type. + /// Copies the elements of the to a new array of the specified element type. /// /// The element Type of the destination array to create and copy elements to. - /// An array of the specified element type containing copies of the elements of the ArrayList. + /// An array of the specified element type containing copies of the elements of the . public virtual Array ToArray(Type type) { var array = Array.CreateInstance(type, _size); diff --git a/source/System/Collections/HashTable.cs b/source/System/Collections/HashTable.cs index 2cf94f1c..208e54f9 100644 --- a/source/System/Collections/HashTable.cs +++ b/source/System/Collections/HashTable.cs @@ -301,7 +301,7 @@ public ICollection Values /// Gets or sets the element with the specified key. /// /// The key of the element to get or set. - /// The element with the specified key, or null if the key does not exist. + /// The element with the specified key, or if the key does not exist. public object this[object key] { get diff --git a/source/System/Collections/IDictionary.cs b/source/System/Collections/IDictionary.cs index 28868a39..6ff611b8 100644 --- a/source/System/Collections/IDictionary.cs +++ b/source/System/Collections/IDictionary.cs @@ -44,7 +44,7 @@ public interface IDictionary : ICollection /// Gets or sets the element with the specified key. /// /// The key of the element to get or set. - /// The element with the specified key, or null if the key does not exist. + /// The element with the specified key, or if the key does not exist. object this[object key] { get; set; } /// diff --git a/source/System/Convert.cs b/source/System/Convert.cs index 05481d7f..0ed061d0 100644 --- a/source/System/Convert.cs +++ b/source/System/Convert.cs @@ -53,7 +53,7 @@ public static char ToChar(ushort value) /// /// A string that contains the number to convert. /// The base of the number in , which must be 2, 8, 10, or 16. See remark bellow about platform support. - /// An 8-bit signed integer that is equivalent to the number in value, or 0 (zero) if value is null. + /// An 8-bit signed integer that is equivalent to the number in value, or 0 (zero) if value is . /// /// The nanoFramework implementation of this method may provide only a subset of the equivalent .NET method, /// which is supporting only conversions for base 10 values. In that case, any call using a with a value other than 10 will throw a . @@ -71,7 +71,7 @@ public static sbyte ToSByte(string value, int fromBase = 10) /// /// A string that contains the number to convert. /// The base of the number in , which must be 2, 8, 10, or 16. See remark bellow about platform support. - /// An 8-bit unsigned integer that is equivalent to value, or zero if value is null. + /// An 8-bit unsigned integer that is equivalent to value, or zero if value is . /// /// The nanoFramework implementation of this method may provide only a subset of the equivalent .NET method, /// which is supporting only conversions for base 10 values. In that case, any call using a with a value other than 10 will throw a . @@ -88,7 +88,7 @@ public static byte ToByte(string value, int fromBase = 10) /// /// A string that contains the number to convert. /// The base of the number in , which must be 2, 8, 10, or 16. See remark bellow about platform support. - /// A 16-bit signed integer that is equivalent to the number in value, or 0 (zero) if value is null. + /// A 16-bit signed integer that is equivalent to the number in value, or 0 (zero) if value is . /// /// The nanoFramework implementation of this method may provide only a subset of the equivalent .NET method, /// which is supporting only conversions for base 10 values. In that case, any call using a with a value other than 10 will throw a . @@ -105,7 +105,7 @@ public static short ToInt16(string value, int fromBase = 10) /// /// A string that contains the number to convert. /// The base of the number in , which must be 2, 8, 10, or 16. See remark bellow about platform support. - /// A 16-bit unsigned integer that is equivalent to the number in value, or 0 (zero) if value is null. + /// A 16-bit unsigned integer that is equivalent to the number in value, or 0 (zero) if value is . /// /// The nanoFramework implementation of this method may provide only a subset of the equivalent .NET method, /// which is supporting only conversions for base 10 values. In that case, any call using a with a value other than 10 will throw a . @@ -123,7 +123,7 @@ public static ushort ToUInt16(string value, int fromBase = 10) /// /// A string that contains the number to convert. /// The base of the number in , which must be 2, 8, 10, or 16. See remark bellow about platform support. - /// A 32-bit signed integer that is equivalent to the number in value, or 0 (zero) if value is null. + /// A 32-bit signed integer that is equivalent to the number in value, or 0 (zero) if value is . /// /// The nanoFramework implementation of this method may provide only a subset of the equivalent .NET method, /// which is supporting only conversions for base 10 values. In that case, any call using a with a value other than 10 will throw a . @@ -140,7 +140,7 @@ public static int ToInt32(string value, int fromBase = 10) /// /// A string that contains the number to convert. /// The base of the number in , which must be 2, 8, 10, or 16. See remark bellow about platform support. - /// A 32-bit unsigned integer that is equivalent to the number in value, or 0 (zero) if value is null. + /// A 32-bit unsigned integer that is equivalent to the number in value, or 0 (zero) if value is . /// /// The nanoFramework implementation of this method may provide only a subset of the equivalent .NET method, /// which is supporting only conversions for base 10 values. In that case, any call using a with a value other than 10 will throw a . @@ -158,13 +158,13 @@ public static uint ToUInt32(string value, int fromBase = 10) /// /// A string that contains a number to convert. /// The base of the number in , which must be 2, 8, 10, or 16. See remark bellow about platform support. - /// A 64-bit signed integer that is equivalent to the number in value, or 0 (zero) if value is null. + /// A 64-bit signed integer that is equivalent to the number in value, or 0 (zero) if value is . /// /// The nanoFramework implementation of this method may provide only a subset of the equivalent .NET method, /// which is supporting only conversions for base 10 values. In that case, any call using a with a value other than 10 will throw a . /// /// is not 2, 8, 10, or 16. - /// If the platform doesn't have support to convert from non-base 10 values.If the platform doesn't have support to convert from non-base 10 values. public static long ToInt64(string value, int fromBase = 10) { return NativeToInt64(value, true, Int64.MinValue, Int64.MaxValue, fromBase); @@ -175,7 +175,7 @@ public static long ToInt64(string value, int fromBase = 10) /// /// A string that contains the number to convert. /// The base of the number in , which must be 2, 8, 10, or 16. See remark bellow about platform support. - /// A 64-bit signed integer that is equivalent to the number in value, or 0 (zero) if value is null. + /// A 64-bit signed integer that is equivalent to the number in value, or 0 (zero) if value is . /// /// The nanoFramework implementation of this method may provide only a subset of the equivalent .NET method, /// which is supporting only conversions for base 10 values. In that case, any call using a with a value other than 10 will throw a . @@ -192,7 +192,7 @@ public static ulong ToUInt64(string value, int fromBase = 10) /// Converts the specified string representation of a number to an equivalent double-precision floating-point number. /// /// A string that contains the number to convert. - /// A double-precision floating-point number that is equivalent to the number in value, or 0 (zero) if value is null. + /// A double-precision floating-point number that is equivalent to the number in value, or 0 (zero) if value is . public static double ToDouble(string value) { return NativeToDouble(value); diff --git a/source/System/DateTime.cs b/source/System/DateTime.cs index fbf9ea6e..e8dd3b5d 100644 --- a/source/System/DateTime.cs +++ b/source/System/DateTime.cs @@ -247,7 +247,7 @@ public static int Compare(DateTime t1, DateTime t2) /// /// Compares the value of this instance to a specified object that contains a specified DateTime value, and returns an integer that indicates whether this instance is earlier than, the same as, or later than the specified DateTime value. /// - /// A boxed object to compare, or nullNothingnullptrunita null reference (Nothing in Visual Basic). + /// A boxed object to compare, or null reference (Nothing in Visual Basic). /// A signed number indicating the relative values of this instance and value. public int CompareTo(Object val) { diff --git a/source/System/Delegate.cs b/source/System/Delegate.cs index 73f31891..6225bcfb 100644 --- a/source/System/Delegate.cs +++ b/source/System/Delegate.cs @@ -27,7 +27,7 @@ public abstract class Delegate /// /// The delegate whose invocation list comes first. /// The delegate whose invocation list comes last. - /// A new delegate with an invocation list that concatenates the invocation lists of a and b in that order. Returns a if b is nullNothingnullptrunita null reference (Nothing in Visual Basic), returns b if a is a null reference, and returns a null reference if both a and b are null references. + /// A new delegate with an invocation list that concatenates the invocation lists of a and b in that order. Returns a if b is null reference (Nothing in Visual Basic), returns b if a is a null reference, and returns a null reference if both a and b are null references. [MethodImpl(MethodImplOptions.InternalCall)] public static extern Delegate Combine(Delegate a, Delegate b); @@ -47,7 +47,7 @@ public extern MethodInfo Method /// Gets the class instance on which the current delegate invokes the instance method. /// /// - /// The object on which the current delegate invokes the instance method, if the delegate represents an instance method; nullNothingnullptrunita null reference (Nothing in Visual Basic) if the delegate represents a static method. + /// The object on which the current delegate invokes the instance method, if the delegate represents an instance method; null reference (Nothing in Visual Basic) if the delegate represents a static method. /// public extern Object Target { @@ -60,7 +60,7 @@ public extern Object Target /// /// The delegate from which to remove the invocation list of value. /// The delegate that supplies the invocation list to remove from the invocation list of source. - /// A new delegate with an invocation list formed by taking the invocation list of source and removing the last occurrence of the invocation list of value, if the invocation list of value is found within the invocation list of source. Returns source if value is nullNothingnullptrunita null reference (Nothing in Visual Basic) or if the invocation list of value is not found within the invocation list of source. Returns a null reference if the invocation list of value is equal to the invocation list of source or if source is a null reference. + /// A new delegate with an invocation list formed by taking the invocation list of source and removing the last occurrence of the invocation list of value, if the invocation list of value is found within the invocation list of source. Returns source if value is null reference (Nothing in Visual Basic) or if the invocation list of value is not found within the invocation list of source. Returns a null reference if the invocation list of value is equal to the invocation list of source or if source is a null reference. [MethodImpl(MethodImplOptions.InternalCall)] public static extern Delegate Remove(Delegate source, Delegate value); diff --git a/source/System/Double.cs b/source/System/Double.cs index 772a52bc..920a5925 100644 --- a/source/System/Double.cs +++ b/source/System/Double.cs @@ -136,7 +136,7 @@ public String ToString(String format) /// Converts the string representation of a number to its double-precision floating-point number equivalent. A return value indicates whether the conversion succeeded or failed. /// /// A string containing a number to convert. - /// When this method returns, contains the double-precision floating-point number equivalent to the s parameter, if the conversion succeeded, or zero if the conversion failed. The conversion fails if the s parameter is nullNothingnullptrunita null reference (Nothing in Visual Basic), is not a number in a valid format, or represents a number less than MinValue or greater than MaxValue. This parameter is passed uninitialized. + /// When this method returns, contains the double-precision floating-point number equivalent to the s parameter, if the conversion succeeded, or zero if the conversion failed. The conversion fails if the s parameter is null reference (Nothing in Visual Basic), is not a number in a valid format, or represents a number less than MinValue or greater than MaxValue. This parameter is passed uninitialized. /// true if s was converted successfully; otherwise, false. public static bool TryParse(string s, out double result) { diff --git a/source/System/Exception.cs b/source/System/Exception.cs index badd2ee5..026096ea 100644 --- a/source/System/Exception.cs +++ b/source/System/Exception.cs @@ -18,6 +18,11 @@ public class Exception private readonly Exception _innerException; private object _stackTrace; + + /// + /// Gets or sets HRESULT, a coded numerical value that is assigned to a specific exception. + /// + /// The HRESULT value./// protected int HResult; /// diff --git a/source/System/Guid.cs b/source/System/Guid.cs index 23a24d76..c8911ff4 100644 --- a/source/System/Guid.cs +++ b/source/System/Guid.cs @@ -3,6 +3,9 @@ namespace System { + /// + /// Represents a globally unique identifier (GUID). + /// [Serializable] public struct Guid { diff --git a/source/System/IFormatProvider.cs b/source/System/IFormatProvider.cs index 614f14ef..77476a97 100644 --- a/source/System/IFormatProvider.cs +++ b/source/System/IFormatProvider.cs @@ -15,7 +15,7 @@ public interface IFormatProvider /// Returns an object that provides formatting services for the specified type. /// /// An object that specifies the type of format object to return. - /// An instance of the object specified by formatType, if the IFormatProvider implementation can supply that type of object; otherwise, nullNothingnullptrunita null reference (Nothing in Visual Basic). + /// An instance of the object specified by formatType, if the IFormatProvider implementation can supply that type of object; otherwise, null reference (Nothing in Visual Basic). Object GetFormat(Type formatType); } } diff --git a/source/System/IO/IOException.cs b/source/System/IO/IOException.cs index c6fb4ece..7d141bb8 100644 --- a/source/System/IO/IOException.cs +++ b/source/System/IO/IOException.cs @@ -67,7 +67,7 @@ public IOException() } /// - /// Initializes a new instance of the IOException class with its message string set to message, its HRESULT set to COR_E_IO, and its inner exception set to nullNothingnullptrunita null reference (Nothing in Visual Basic). + /// Initializes a new instance of the IOException class with its message string set to message, its HRESULT set to COR_E_IO, and its inner exception set to null reference (Nothing in Visual Basic). /// /// A String that describes the error. The content of message is intended to be understood by humans. The caller of this constructor is required to ensure that this string has been localized for the current system culture. public IOException(String message) @@ -90,7 +90,7 @@ public IOException(String message, int hresult) /// Initializes a new instance of the IOException class with a specified error message and a reference to the inner exception that is the cause of this exception. /// /// The error message that explains the reason for the exception. - /// The exception that is the cause of the current exception. If the innerException parameter is not nullNothingnullptrunita null reference (Nothing in Visual Basic), the current exception is raised in a catch block that handles the inner exception. + /// The exception that is the cause of the current exception. If the innerException parameter is not null reference (Nothing in Visual Basic), the current exception is raised in a catch block that handles the inner exception. public IOException(String message, Exception innerException) : base(message, innerException) { diff --git a/source/System/IO/Stream.cs b/source/System/IO/Stream.cs index 79308072..0d0a8f9d 100644 --- a/source/System/IO/Stream.cs +++ b/source/System/IO/Stream.cs @@ -156,6 +156,9 @@ public void Dispose() } } + /// + /// + /// ~Stream() { Dispose(false); diff --git a/source/System/ObjectDisposedException.cs b/source/System/ObjectDisposedException.cs index 2d4e297e..478a7fe9 100644 --- a/source/System/ObjectDisposedException.cs +++ b/source/System/ObjectDisposedException.cs @@ -32,7 +32,7 @@ public ObjectDisposedException(String message) /// Initializes a new instance of the ObjectDisposedException class with a specified error message and a reference to the inner exception that is the cause of this exception. /// /// The error message that explains the reason for the exception. - /// The exception that is the cause of the current exception. If innerException is not nullNothingnullptrunita null reference (Nothing in Visual Basic), the current exception is raised in a catch block that handles the inner exception. + /// The exception that is the cause of the current exception. If innerException is not null reference (Nothing in Visual Basic), the current exception is raised in a catch block that handles the inner exception. public ObjectDisposedException(String message, Exception innerException) : base(message, innerException) { diff --git a/source/System/Text/UTF8Encoding.cs b/source/System/Text/UTF8Encoding.cs index 5e0f7f0e..0aa4ba80 100644 --- a/source/System/Text/UTF8Encoding.cs +++ b/source/System/Text/UTF8Encoding.cs @@ -13,7 +13,7 @@ // processing multiple characters at a time, and falling back to the slow loop for all special cases. // This define can be used to turn off the fast loops. Useful for finding whether -// the problem is fastloop-specific. +// the problem is fast-loop specific. #define FASTLOOP namespace System.Text @@ -31,6 +31,10 @@ namespace System.Text // (0xFEFF) written in UTF-8 (0xEF 0xBB 0xBF). The byte order mark is // used mostly to distinguish UTF-8 text from other encodings, and doesn't // switch the byte orderings. + + /// + /// Represents a UTF-8 encoding of Unicode characters. + /// public class UTF8Encoding : Encoding { @@ -52,19 +56,48 @@ public UTF8Encoding() { } + /// + /// + /// + /// + /// [MethodImpl(MethodImplOptions.InternalCall)] public override extern byte[] GetBytes(String s); - + /// + /// Encodes a set of characters from the specified into the specified byte array. + /// + /// The containing the set of characters to encode. + /// The index of the first character to encode. + /// The number of characters to encode. + /// The byte array to contain the resulting sequence of bytes. + /// The index at which to start writing the resulting sequence of bytes. + /// The actual number of bytes written into . [MethodImpl(MethodImplOptions.InternalCall)] public override extern int GetBytes(string s, int charIndex, int charCount, byte[] bytes, int byteIndex); + /// + /// Decodes a sequence of bytes from the specified byte array into a set of characters. + /// + /// The byte array containing the sequence of bytes to decode. + /// The actual number of characters returned. [MethodImpl(MethodImplOptions.InternalCall)] public override extern char[] GetChars(byte[] bytes); + /// + /// Decodes a sequence of bytes from the specified byte array into a set of characters. + /// + /// The byte array containing the sequence of bytes to decode. + /// The index of the first byte to decode. + /// The number of bytes to decode. + /// The actual number of characters returned. [MethodImpl(MethodImplOptions.InternalCall)] public override extern char[] GetChars(byte[] bytes, int byteIndex, int byteCount); + /// + /// Obtains a decoder that converts a UTF-8 encoded sequence of bytes into a sequence of Unicode characters. + /// + /// A decoder that converts a UTF-8 encoded sequence of bytes into a sequence of Unicode characters. public override Decoder GetDecoder() { return new UTF8Decoder();