Share via


SPUserCodeCachedAssemblyGroup.Activate method

Creates a new instance of a sandboxed solution type in the sandboxed solution assembly.

Namespace:  Microsoft.SharePoint.Administration
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

Syntax

'Declaration
Public Function Activate ( _
    assemblyName As String, _
    typeName As String _
) As Object
'Usage
Dim instance As SPUserCodeCachedAssemblyGroup
Dim assemblyName As String
Dim typeName As String
Dim returnValue As Object

returnValue = instance.Activate(assemblyName, _
    typeName)
public Object Activate(
    string assemblyName,
    string typeName
)

Parameters

  • assemblyName
    Type: System.String

    The full name of the sandboxed solution assembly that contains the sandboxed solution type.

  • typeName
    Type: System.String

    The name of the sandboxed solution type.

Return value

Type: System.Object
The new instance of the specified sandboxed solution type.

Exceptions

Exception Condition
InvalidOperationException

Cannot create an instance of typeName from assemblyName.

Remarks

You must cast the returned object to the correct data type before using it.

See also

Reference

SPUserCodeCachedAssemblyGroup class

SPUserCodeCachedAssemblyGroup members

Microsoft.SharePoint.Administration namespace