Merge pull request #2977 from BrzVlad/fix-major-log2
[mono.git] / mcs / class / referencesource / System.Data / System / Data / PropertyCollection.cs
1 //------------------------------------------------------------------------------
2 // <copyright file="PropertyCollection.cs" company="Microsoft">
3 //     Copyright (c) Microsoft Corporation.  All rights reserved.
4 // </copyright>                                                                
5 // <owner current="true" primary="true">[....]</owner>
6 // <owner current="true" primary="false">[....]</owner>
7 // <owner current="false" primary="false">[....]</owner>
8 //------------------------------------------------------------------------------
9
10 namespace System.Data {
11     using System;
12     using System.Collections;
13     using System.Runtime.Serialization;
14
15     /// <devdoc>
16     /// <para>Represents a collection of properties that can be added to <see cref='System.Data.DataColumn'/>, 
17     /// <see cref='System.Data.DataSet'/>, 
18     ///    or <see cref='System.Data.DataTable'/>.</para>
19     /// </devdoc>
20     [Serializable]
21     public class PropertyCollection : Hashtable {
22         public PropertyCollection() : base() {
23         }
24         
25         protected PropertyCollection(SerializationInfo info, StreamingContext context) : base(info, context) {
26         }
27
28         public override object Clone() {
29             // override Clone so that returned object is an
30             // instance of PropertyCollection instead of Hashtable
31             PropertyCollection clone = new PropertyCollection();
32             foreach (DictionaryEntry pair in this) {
33                 clone.Add(pair.Key, pair.Value);
34             }
35             return clone;
36         }
37     }
38     //3 NOTE: This should have been named PropertyDictionary, to avoid fxcop warnings about not having strongly typed IList and ICollection implementations, but it's too late now...
39 }