CodeDomProvider::GenerateCodeFromMember Method (CodeTypeMember^, TextWriter^, CodeGeneratorOptions^)
.NET Framework (current version)
Generates code for the specified Code Document Object Model (CodeDOM) member declaration and sends it to the specified text writer, using the specified options.
Assembly: System (in System.dll)
public: virtual void GenerateCodeFromMember( CodeTypeMember^ member, TextWriter^ writer, CodeGeneratorOptions^ options )
Parameters
- member
-
Type:
System.CodeDom::CodeTypeMember^
A CodeTypeMember object that indicates the member for which to generate code.
- writer
-
Type:
System.IO::TextWriter^
The TextWriter to which output code is sent.
- options
-
Type:
System.CodeDom.Compiler::CodeGeneratorOptions^
A CodeGeneratorOptions that indicates the options to use for generating code.
| Exception | Condition |
|---|---|
| NotImplementedException | This method is not overridden in a derived class. |
The base class implementation throws a NotImplementedException. See CSharpCodeProvider::GenerateCodeFromMember for documentation describing an implementation of this method.
The following code example shows the use of the GenerateCodeFromMember method as implemented by the CSharpCodeProvider and VBCodeProvider classes.
.NET Framework
Available since 2.0
Available since 2.0
Show: