WIP
DirectOutput framework for virtual pinball cabinets WIP
Go to:
Overview 
TypeList.cs
Go to the documentation of this file.
1 using System;
2 using System.Collections.Generic;
3 
4 namespace DirectOutput.General
5 {
6 
10  public class TypeList : List<Type>
11  {
12 
18  public Type this[string TypeName]
19  {
20  get
21  {
22  foreach (Type Type in this)
23  {
24  if (Type.Name == TypeName)
25  {
26  return Type;
27  }
28 
29  }
30  return null;
31 
32  }
33  }
34 
35 
41  public bool Contains(string TypeName)
42  {
43  return this[TypeName] != null;
44  }
45 
46 
50  public TypeList() : base() { }
55  public TypeList(int capacity) : base(capacity) { }
60  public TypeList(IEnumerable<Type> collection) : base(collection) { }
61 
62  }
63 }
bool Contains(string TypeName)
Checks if a Type with the specified TypeName exists in the list.
Definition: TypeList.cs:41
TypeList()
Initializes a new instance of the TypeList class.
Definition: TypeList.cs:50
TypeList(IEnumerable< Type > collection)
Initializes a new instance of the TypeList class.
Definition: TypeList.cs:60
TypeList(int capacity)
Initializes a new instance of the TypeList class.
Definition: TypeList.cs:55
List for Type objects.
Definition: TypeList.cs:10