ArcGIS Pro 3.4 API Reference Guide
ArcGIS.Desktop.Core Namespace / Project Class / IsDirty Property
Example Version

IsDirty Property (Project)
Gets the dirty state of the project
Syntax
public bool IsDirty {get;}

Property Value

True if the project is dirty
Remarks

The project's dirty state indicates changes made to the project have not yet been saved. For example, after adding a map to the project, IsDirty will return True and the Save button is enabled.

Example
Check if project needs to be saved
//The project's dirty state indicates changes made to the project have not yet been saved. 
bool isProjectDirty = Project.Current.IsDirty;
Requirements

Target Platforms: Windows 11, Windows 10

ArcGIS Pro version: 3 or higher.
See Also