Microsoft.VisualStudio.Project.ProjectElement.RemoveFromProjectFile C# (CSharp) Method

RemoveFromProjectFile() public method

Calling this method remove this item from the project file. Once the item is delete, you should not longer be using it. Note that the item should be removed from the hierarchy prior to this call.
public RemoveFromProjectFile ( ) : void
return void
        public void RemoveFromProjectFile()
        {
            if(!deleted && Item != null)
            {
                ProjectManager.BuildProject.RemoveItem(Item);
                deleted = true;
            }

            item = null;
        }