EventHandler for ObjectChanged doesn't fire

I’m stranded making on the code of the Event Handler. I would like to know whether or not any C# component is changed on the active campus. Thanks to the several topics on this forum, I could make the code below, but it doesn’t work although the IntelliSense of Rhino8 allows it. Does anyone point out which part is wrong?

// Grasshopper Script Instance
using System;
using System.Collections;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;

using Rhino;
using Rhino.Geometry;

using Grasshopper;
using Grasshopper.Kernel;
using Grasshopper.Kernel.Data;
using Grasshopper.Kernel.Types;

public class Script_Instance : GH_ScriptInstance
{
/*
Members:
RhinoDoc RhinoDocument
GH_Document GrasshopperDocument
IGH_Component Component
int Iteration

Methods (Virtual & overridable):
  Print(string text)
  Print(string format, params object[] args)
  Reflect(object obj)
  Reflect(object obj, string method_name)

*/

private void RunScript(ref object a)
{
if(!_init)
{
Component.ObjectChanged -= CSharpChangedHandler;
Component.ObjectChanged += CSharpChangedHandler;

    _init = true;
}
a = guid;

}

private bool _init = false;
private bool a = false;
Guid guid = new Guid();

private void CSharpChangedHandler(IGH_DocumentObject sender, GH_ObjectChangedEventArgs e)
{
if (e.Type == GH_ObjectEventType.Enabled && sender.Name.Contains(“CSharp”))
{
guid = sender.InstanceGuid;
Component.ExpireSolution(false);
}
}

}

I found this one worked for itself; when I change Enable/Disable of this component, it outputs the guid of itself. So I changed “Component.ObjectChanged” part into “Grasshopper.Instances.ActiveCanvas.ActiveObject.ObjectChanged” only to find “Exception has been thrown by the target” error. Is it impossible to implement?

I could find the way:
List<IGH_ActiveObject> objs = Instances.ActiveCanvas.Document.ActiveObjects();
foreach (IGH_ActiveObject obj in objs)

    obj.ObjectChanged += CSharpObjectChanged;