Class TypeCastObject<T>
The interface which allows defined objects to be cast to each other.
Inheritance
System.Object
TypeCastObject<T>
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: Exiled.API.Features.Core
Assembly: Exiled.API.dll
Syntax
public abstract class TypeCastObject<T>
where T : class
Type Parameters
Name | Description |
---|---|
T | The type of the object to cast. |
Constructors
| Improve this Doc View SourceTypeCastObject()
Initializes a new instance of the TypeCastObject<T> class.
Declaration
protected TypeCastObject()
Methods
| Improve this Doc View SourceAs<TObject>()
Declaration
public TObject As<TObject>()
where TObject : class, T
Returns
Type | Description |
---|---|
TObject |
Type Parameters
Name | Description |
---|---|
TObject |
Cast<TObject>()
Unsafely casts the current T
instance to the specified TObject
type.
Declaration
public TObject Cast<TObject>()
where TObject : class, T
Returns
Type | Description |
---|---|
TObject | The cast |
Type Parameters
Name | Description |
---|---|
TObject | The type to which to cast the |
Cast<TObject>(out TObject)
Safely casts the current TObject
instance to the specified TObject
type.
Declaration
public bool Cast<TObject>(out TObject param)
where TObject : class, T
Parameters
Type | Name | Description |
---|---|---|
TObject | param | The cast object. |
Returns
Type | Description |
---|---|
System.Boolean | true if the |
Type Parameters
Name | Description |
---|---|
TObject | The type to which to cast the |
Is<TObject>(out TObject)
Declaration
public bool Is<TObject>(out TObject param)
where TObject : class, T
Parameters
Type | Name | Description |
---|---|---|
TObject | param |
Returns
Type | Description |
---|---|
System.Boolean |
Type Parameters
Name | Description |
---|---|
TObject |