Defines a standalone managed resource for this assembly.
[Visual Basic] Overloads Public Function DefineResource( _ ByVal name As String, _ ByVal description As String, _ ByVal fileName As String _ ) As ResourceWriter [C#] public ResourceWriter DefineResource( string name, string description, string fileName ); [C++] public: ResourceWriter* DefineResource( String* name, String* description, String* fileName ); [JScript] public function DefineResource( name : String, description : String, fileName : String ) : ResourceWriter;
A ResourceWriter object for the specified resource.
Exception Type | Condition |
---|---|
ArgumentException | If name has been previously defined |
Fine-grain resources can be added with the returned ResourceWriter by calling AddResource.
Filename should not be the same as that of any other persistable module, standalone managed resource, or the standalone manifest file.
NGWS Runtime Security:
ReflectionPermission | SecurityAction.Demand, ReflectionEmit=true |
AssemblyBuilder Class | AssemblyBuilder Members | System.Reflection.Emit Namespace | AssemblyBuilder.DefineResource Overload List