ReadOnlyCollectionBaseT Class |
Namespace: Aspose.Tasks
public abstract class ReadOnlyCollectionBase<T> : IList<T>, ICollection<T>, IEnumerable<T>, IEnumerable
The ReadOnlyCollectionBaseT type exposes the following members.
Name | Description | |
---|---|---|
![]() ![]() | Count |
Gets the number of objects contained in the object.
|
![]() | Item |
Returns the element at the specified index.
|
Name | Description | |
---|---|---|
![]() | Add |
This is the stub implementation of ICollection's Add method, that only throws NotSupportedException
|
![]() | Equals | (Inherited from Object.) |
![]() | Finalize | (Inherited from Object.) |
![]() ![]() | GetEnumerator |
Returns an enumerator for this collection.
|
![]() | GetHashCode | (Inherited from Object.) |
![]() | GetType | (Inherited from Object.) |
![]() | MemberwiseClone | (Inherited from Object.) |
![]() ![]() | ToList |
Converts the collection object to a list of VbaModule objects.
|
![]() | ToString | (Inherited from Object.) |
var project = new Project(DataDir + "VbaProject.mpp"); var vbaProject = project.VbaProject; Console.WriteLine("Total Modules Count: " + vbaProject.Modules.Count); foreach (var module in vbaProject.Modules) { Console.WriteLine("Module Name: " + module.Name); Console.WriteLine("Source Code: " + module.SourceCode); Console.WriteLine(); } // the collection can be converted into a plain list List<VbaModule> modules = vbaProject.Modules.ToList(); foreach (var unused in modules) { // work with modules }