Ask Learn
Preview
Please sign in to use this experience.
Sign inThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
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.
When overridden in a derived class, creates a new code generator.
CreateGenerator() |
Obsolete.
Obsolete.
When overridden in a derived class, creates a new code generator. |
CreateGenerator(TextWriter) |
When overridden in a derived class, creates a new code generator using the specified TextWriter for output. |
CreateGenerator(String) |
When overridden in a derived class, creates a new code generator using the specified file name for output. |
Caution
ICodeGenerator has been deprecated. Use the methods directly on the CodeDomProvider class instead. Classes inheriting from CodeDomProvider must still implement this interface, and should suppress this warning or also mark this method as obsolete.
Caution
Callers should not use the ICodeGenerator interface and should instead use the methods directly on the CodeDomProvider class. Those inheriting from CodeDomProvider must still implement this interface, and should exclude this warning or also obsolete this method.
When overridden in a derived class, creates a new code generator.
public:
abstract System::CodeDom::Compiler::ICodeGenerator ^ CreateGenerator();
[System.Obsolete("ICodeGenerator has been deprecated. Use the methods directly on the CodeDomProvider class instead. Classes inheriting from CodeDomProvider must still implement this interface, and should suppress this warning or also mark this method as obsolete.")]
public abstract System.CodeDom.Compiler.ICodeGenerator CreateGenerator();
public abstract System.CodeDom.Compiler.ICodeGenerator CreateGenerator();
[System.Obsolete("Callers should not use the ICodeGenerator interface and should instead use the methods directly on the CodeDomProvider class. Those inheriting from CodeDomProvider must still implement this interface, and should exclude this warning or also obsolete this method.")]
public abstract System.CodeDom.Compiler.ICodeGenerator CreateGenerator();
[<System.Obsolete("ICodeGenerator has been deprecated. Use the methods directly on the CodeDomProvider class instead. Classes inheriting from CodeDomProvider must still implement this interface, and should suppress this warning or also mark this method as obsolete.")>]
abstract member CreateGenerator : unit -> System.CodeDom.Compiler.ICodeGenerator
abstract member CreateGenerator : unit -> System.CodeDom.Compiler.ICodeGenerator
[<System.Obsolete("Callers should not use the ICodeGenerator interface and should instead use the methods directly on the CodeDomProvider class. Those inheriting from CodeDomProvider must still implement this interface, and should exclude this warning or also obsolete this method.")>]
abstract member CreateGenerator : unit -> System.CodeDom.Compiler.ICodeGenerator
Public MustOverride Function CreateGenerator () As ICodeGenerator
An ICodeGenerator that can be used to generate System.CodeDom based source code representations.
This method is obsolete. The recommended alternative is to call the ICodeGenerator methods that are directly available in the CodeDomProvider class.
You should implement the ICodeGenerator members in the CodeDomProvider class and throw a NotSupportedException when this method is called.
Product | Versions (Obsolete) |
---|---|
.NET | (8 (package-provided), 9 (package-provided), 10 (package-provided)) |
.NET Framework | 1.1 (2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1) |
.NET Standard | (2.0 (package-provided)) |
Windows Desktop | (3.0, 3.1, 5, 6, 7, 8, 9, 10) |
When overridden in a derived class, creates a new code generator using the specified TextWriter for output.
public:
virtual System::CodeDom::Compiler::ICodeGenerator ^ CreateGenerator(System::IO::TextWriter ^ output);
public virtual System.CodeDom.Compiler.ICodeGenerator CreateGenerator(System.IO.TextWriter output);
abstract member CreateGenerator : System.IO.TextWriter -> System.CodeDom.Compiler.ICodeGenerator
override this.CreateGenerator : System.IO.TextWriter -> System.CodeDom.Compiler.ICodeGenerator
Public Overridable Function CreateGenerator (output As TextWriter) As ICodeGenerator
A TextWriter to use to output.
An ICodeGenerator that can be used to generate System.CodeDom based source code representations.
This method uses the specified TextWriter for output. This method supports more optimized code generation that incrementally updates the source code.
Note
The base class implementation calls the CreateGenerator method, which is obsolete and results in a NotSupportedException if an ICodeGenerator object is not returned.
Product | Versions |
---|---|
.NET | 8 (package-provided), 9 (package-provided), 10 (package-provided) |
.NET Framework | 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
.NET Standard | 2.0 (package-provided) |
Windows Desktop | 3.0, 3.1, 5, 6, 7, 8, 9, 10 |
When overridden in a derived class, creates a new code generator using the specified file name for output.
public:
virtual System::CodeDom::Compiler::ICodeGenerator ^ CreateGenerator(System::String ^ fileName);
public virtual System.CodeDom.Compiler.ICodeGenerator CreateGenerator(string fileName);
abstract member CreateGenerator : string -> System.CodeDom.Compiler.ICodeGenerator
override this.CreateGenerator : string -> System.CodeDom.Compiler.ICodeGenerator
Public Overridable Function CreateGenerator (fileName As String) As ICodeGenerator
The file name to output to.
An ICodeGenerator that can be used to generate System.CodeDom based source code representations.
This method uses the specified file name for output.
Note
The base class implementation calls the CreateGenerator method, which is obsolete and results in a NotSupportedException if an ICodeGenerator object is not returned.
Product | Versions |
---|---|
.NET | 8 (package-provided), 9 (package-provided), 10 (package-provided) |
.NET Framework | 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
.NET Standard | 2.0 (package-provided) |
Windows Desktop | 3.0, 3.1, 5, 6, 7, 8, 9, 10 |
.NET feedback
.NET is an open source project. Select a link to provide feedback:
Please sign in to use this experience.
Sign in