Class ActivatorHelper
Our generic handler to create any type using one method. Also this allows us to keep GPAL classes internal so users cannot instantiate them except via the GPAL factory new GPALFile() is not allowed, use GPALFile gpalFile = GPAL.File.ToGPALObject();
Inheritance
System.Object
ActivatorHelper
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: GenerallyPositive
Assembly: GPAL.dll
Syntax
public static class ActivatorHelper
Methods
CreateInstance(Type, Int32)
Declaration
public static object CreateInstance(Type type, int elementCount = 0)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Type | type | |
| System.Int32 | elementCount |
Returns
| Type | Description |
|---|---|
| System.Object |
CreateInstance<T>(Int32)
Declaration
public static T CreateInstance<T>(int elementCount = 0)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | elementCount |
Returns
| Type | Description |
|---|---|
| T |
Type Parameters
| Name | Description |
|---|---|
| T |