This documentation is archived and is not being maintained.

RelatedObjectQuery.RelatedObjectQuery(String, String, String, String, String, String, String, Boolean) Constructor

Initializes a new instance of the RelatedObjectQuery class for the given set of parameters. The query is assumed to be an instance query (as opposed to a schema query).

Namespace: System.Management
Assembly: System.Management (in

public RelatedObjectQuery (
	string sourceObject,
	string relatedClass,
	string relationshipClass,
	string relatedQualifier,
	string relationshipQualifier,
	string relatedRole,
	string thisRole,
	bool classDefinitionsOnly
public RelatedObjectQuery (
	String sourceObject, 
	String relatedClass, 
	String relationshipClass, 
	String relatedQualifier, 
	String relationshipQualifier, 
	String relatedRole, 
	String thisRole, 
	boolean classDefinitionsOnly
public function RelatedObjectQuery (
	sourceObject : String, 
	relatedClass : String, 
	relationshipClass : String, 
	relatedQualifier : String, 
	relationshipQualifier : String, 
	relatedRole : String, 
	thisRole : String, 
	classDefinitionsOnly : boolean
Not applicable.



The path of the source object.


The related objects' required class.


The relationship type.


The qualifier required to be present on the related objects.


The qualifier required to be present on the relationships.


The role that the related objects are required to play in the relationship.


The role that the source object is required to play in the relationship.


true to return only the class definitions of the related objects; otherwise, false .

.NET Framework Security

Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.

Windows 98, Windows Server 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0, 1.1, 1.0