This documentation is archived and is not being maintained.

ManagementClass.GetStronglyTypedClassCode Method

Generates a strongly-typed class for a given WMI class.

Overload List

Generates a strongly-typed class for a given WMI class.

[Visual Basic] Overloads Public Function GetStronglyTypedClassCode(Boolean, Boolean) As CodeTypeDeclaration
[C#] public CodeTypeDeclaration GetStronglyTypedClassCode(bool, bool);
[C++] public: CodeTypeDeclaration* GetStronglyTypedClassCode(bool, bool);
[JScript] public function GetStronglyTypedClassCode(Boolean, Boolean) : CodeTypeDeclaration;

Generates a strongly-typed class for a given WMI class. This function generates code for Visual Basic, C#, or JScript, depending on the input parameters.

[Visual Basic] Overloads Public Function GetStronglyTypedClassCode(CodeLanguage, String, String) As Boolean
[C#] public bool GetStronglyTypedClassCode(CodeLanguage, string, string);
[C++] public: bool GetStronglyTypedClassCode(CodeLanguage, String*, String*);
[JScript] public function GetStronglyTypedClassCode(CodeLanguage, String, String) : Boolean;

Example

[C#] Note   This example shows how to use one of the overloaded versions of GetStronglyTypedClassCode. For other examples that might be available, see the individual overload topics.
[C#] 
using System;
using System.Management; 
   
ManagementClass cls = new ManagementClass(null,"Win32_LogicalDisk",null,"");
cls.GetStronglyTypedClassCode(CodeLanguage.CSharp,"C:\temp\Logicaldisk.cs",String.Empty);
   

[Visual Basic, C++, JScript] No example is available for Visual Basic, C++, or JScript. To view a C# example, click the Language Filter button Language Filter in the upper-left corner of the page.

See Also

ManagementClass Class | ManagementClass Members | System.Management Namespace

Show: