A resource writer for the defined resource.
The caller must not call the ResourceWriter.Generate() and ResourceWriter.Close() methods, because these methods are called by ModuleBuilder.Save when the dynamic assembly is written to disk.
Use this method to embed a managed resource. To embed a manifest resource blob, use the ModuleBuilder.DefineManifestResource(string, System.IO.Stream, System.Reflection.ResourceAttributes) method. For a summary of embedding and linking managed resources and manifest resource blobs, see the ModuleBuilder.DefineManifestResource(string, System.IO.Stream, System.Reflection.ResourceAttributes) method.
Starting with the net_v20sp1_long, this member no longer requires System.Security.Permissions.ReflectionPermission with the System.Security.Permissions.ReflectionPermissionFlag.ReflectionEmit flag. (See Security Issues in Reflection Emit.) To use this functionality, your application should target the net_v35_long or later.