EnumValueCollectionT Class

Collection of EnumValues

Inheritance Hierarchy

SystemObject
  TwinCAT.TypeSystemEnumValueCollectionT

Namespace: TwinCAT.TypeSystem
Assembly: TwinCAT.Ads (in TwinCAT.Ads.dll) Version: 7.0.0+e56d35ccc4675faac24789a4aab60071fc61d470

Syntax

C#

public class EnumValueCollection<T> : IList<EnumValue<T>>, 
    ICollection<EnumValue<T>>, IEnumerable<EnumValue<T>>, IEnumerable, 
    IEnumValueCollection<EnumValue<T>, T>
where T : struct, new(), IConvertible

Type Parameters

T

Base type of enum

The EnumValueCollectionT type exposes the following members.

Constructors

 

Name

Description

EnumValueCollectionT

Initializes a new instance of the EnumValueCollectionT class.

Properties

 

Name

Description

Count

Gets the number of elements contained in the ICollectionT.

Empty

Return an Empty Collection.

IsReadOnly

Gets a value indicating whether the ICollectionT is read-only.

ItemInt32

Gets or sets the element at the specified index.

ItemString

Gets the enumeration value str from the string representation.

Methods

 

Name

Description

Add

Adds an item to the ICollectionT.

AddValue(String, T)

Adds the value.

AddValue(String, T, String, ITypeAttributeCollection)

Adds the value.

AsReadOnly

Gets as read only.

Clear

Removes all items from the ICollectionT.

Contains(EnumValueT)

Determines whether the ICollectionT contains a specific value.

Contains(T)

Determines whether [contains] [the specified value].

Contains(String)

Determines whether [contains] [the specified name].

CopyTo

Copies the entire list.

Equals

Determines whether the specified object is equal to the current object.
(Inherited from Object)

Finalize

Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object)

GetEnumerator

Returns an enumerator that iterates through the collection.

GetHashCode

Serves as the default hash function.
(Inherited from Object)

GetNames

Gets the names.

GetType

Gets the Type of the current instance.
(Inherited from Object)

GetValues

Gets the values.

IndexOf

Determines the index of a specific item in the IListT.

Insert

Inserts an item to the IListT at the specified index.

MemberwiseClone

Creates a shallow copy of the current Object.
(Inherited from Object)

Parse

Parses the specified string to the Enum value.

Remove

Removes the first occurrence of a specific object from the ICollectionT.

RemoveAt

Removes the IListT item at the specified index.

ToString

Returns a string that represents the current object.
(Inherited from Object)

TryGetValue

Tries to get the value

TryParse(String, T)

Parse the specified string to the enum value.

TryParse(String, EnumValueT)

Parse the specified string to the enum value.

Operators

 

Name

Description

(EnumValueCollectionT to EnumValueCollection)

Performs an explicit conversion from EnumValueCollectionT to EnumValueCollection.

Reference

TwinCAT.TypeSystem Namespace

Beckhoff Automation GmbH & Co. KG 2001-2026