CodeGenerator.GenerateCodeFromMember Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Generates code for the specified class member using the specified text writer and code generator options.
public:
virtual void GenerateCodeFromMember(System::CodeDom::CodeTypeMember ^ member, System::IO::TextWriter ^ writer, System::CodeDom::Compiler::CodeGeneratorOptions ^ options);
public virtual void GenerateCodeFromMember (System.CodeDom.CodeTypeMember member, System.IO.TextWriter writer, System.CodeDom.Compiler.CodeGeneratorOptions options);
abstract member GenerateCodeFromMember : System.CodeDom.CodeTypeMember * System.IO.TextWriter * System.CodeDom.Compiler.CodeGeneratorOptions -> unit
override this.GenerateCodeFromMember : System.CodeDom.CodeTypeMember * System.IO.TextWriter * System.CodeDom.Compiler.CodeGeneratorOptions -> unit
Public Overridable Sub GenerateCodeFromMember (member As CodeTypeMember, writer As TextWriter, options As CodeGeneratorOptions)
Parameters
- member
- CodeTypeMember
The class member to generate code for.
- writer
- TextWriter
The text writer to output code to.
- options
- CodeGeneratorOptions
The options to use when generating the code.
Exceptions
The Output property is not null
.
Remarks
Code for members is generated differently depending on the context. For example, code for methods on an interface or fields on an enumeration is generated differently from code for the same member on a class. This implementation assumes that the member is being generated for the class context.