NDepend.API Documentation
ChangesObjectState Property
NDepend.CodeModel Namespace > IMethod Interface : ChangesObjectState Property
Gets a value indicating whether this method assigns an instance field of its parent type
Syntax
bool ChangesObjectState {get;}
Remarks
true can be returned also for a constructor or a class constructor method.
true is returned for a static method or a class constructor that modifies the state of an object passed by reference.
true is returned for an instance method of a type T that modifies an instance of T that is not the one referenced by the this reference.
Methods that ChangesObjectState complexify the program because they break type immutability (see IType.IType.IsImmutable).
Requirements

Target Platforms: Windows 11, 10, 8, 7 and Linux, MacOS with net8.0, net7.0 or net6.0 installed

See Also

Reference

IMethod Interface
IMethod Members