Defines the named managed embedded resource with the given attributes that is to be stored in this module.
[Visual Basic] Overloads Public Function DefineResource( _ ByVal name As String, _ ByVal description As String, _ ByVal attribute As ResourceAttributes _ ) As ResourceWriter [C#] public ResourceWriter DefineResource( string name, string description, ResourceAttributes attribute ); [C++] public: ResourceWriter* DefineResource( String* name, String* description, ResourceAttributes attribute ); [JScript] public function DefineResource( name : String, description : String, attribute : ResourceAttributes ) : ResourceWriter;
Returns a resource writer for the defined resource.
Exception Type | Condition |
---|---|
ArgumentNullException | if name is null |
InvalidOperationException | if this module is transient or if the containing assembly is not persistable |
NGWS Runtime Security:
ReflectionPermission | SecurityAction.Demand, ReflectionEmit |
ModuleBuilder Class | ModuleBuilder Members | System.Reflection.Emit Namespace | ModuleBuilder.DefineResource Overload List