# Add support for generic types for custom .NET actions

**URL:** https://www.finalbuilder.com/forums/t/add-support-for-generic-types-for-custom-net-actions/4134
**Category:** Feature Requests
**Created:** [January 18, 2011, 8:42am UTC](https://www.finalbuilder.com/forums/t/add-support-for-generic-types-for-custom-net-actions/4134 "2011-01-18T08:42:03Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![deleted\_user](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/deleted_user/32/937_2.png) [@deleted\_user](https://www.finalbuilder.com/forums/u/deleted_user)
#### Post date: [January 18, 2011, 8:42am UTC](https://www.finalbuilder.com/forums/t/add-support-for-generic-types-for-custom-net-actions/4134/1 "2011-01-18T08:42:03Z")

</div>

Hello,

It would be good to be able have a custom action in .NET in which the object is a generic one.

I have one main object that interacts with FinalBuilder, the virtual Execute() method on this class is called when invoked from FinalBuilder.

public abstract class FBAction : StandardAction { .... }

It would be good to be able to make this class generic:

public abstract class FBAction : StandardAction { ... }

This way, in FinalBuilder i will be able to simply define new .NET Actions like:

Namespace.Classname:

MyCode.FBAction

This will auto-create the underlying "worker" object as DatabaseAccessor, running the needed action.

&nbsp;

&nbsp;

---

<div class="post-metadata">

### Author: ![paulsamways](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/p/e8c25b/32.png) [@paulsamways](https://www.finalbuilder.com/forums/u/paulsamways)
#### Post date: [January 18, 2011, 10:44am UTC](https://www.finalbuilder.com/forums/t/add-support-for-generic-types-for-custom-net-actions/4134/2 "2011-01-18T10:44:55Z")

</div>

Hi,   
  
 It should be easy to create a custom action using ActionStudio that loads an assembly and executes a particular method, here’s an example:   
  
 // Get the property values from the action   
 var assemblyName = GetString(“Assembly”);   
 var typeName = GetString(“Type”);   
  
 // Create instance of the specified type, unwrap and execute.   
 var instance = Activator.CreateInstance(assemblyName, typeName).Unwrap() as FBAction;   
 return instance.Execute();   
  
 Documentation for ActionStudio and writing actions can be found in the ActionStudio manual in the start menu.   
  
 Regards,   
 Paul.
