When you inherit an object into a class, If you don't delcare a constructor, will it use the inherited objects constructor by default?
Or do I have to add these to use the default conscrutors?Code:Public Class clsArrayList Inherits ArrayList Public Function ReturnTypeList(ByVal inType As Type) As ArrayList Dim retList As New ArrayList 'Return a new list by object type For Each o As Object In Me If o.GetType Is inType Then retList.Add(o) Next Return retList End Function End Class
Code:Public Sub New() MyBase.New() End Sub Public Sub New(ByVal capacity As Integer) MyBase.New(capacity) End Sub Public Sub New(ByVal c As System.Collections.ICollection) MyBase.New(c) End Sub
Next question, I am eventually going to be Serializing this arraylist to a XML file using the XmlSerializer and from what I understand that the ArrayList object you serialize needs to Implement an IColletion interface, An arraylist does this by default, Does my class above still implement the ICollection since it's based off a ArrayList object or do I need to specify that as well?
Thanks
Hinder




Reply With Quote