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)
Available in Sandboxed Solutions: Yes
Available in SharePoint Online
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.StringThe full name of the sandboxed solution assembly that contains the sandboxed solution type.
typeName
Type: System.StringThe 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