title: Serialization of a class with events
body: <p>I have a Class like this:</p>
  
  <pre><code>public delegate void ChangedEventHandler(object sender, EventArgs e);
  [Serializable]
  public class valueDouble
  {
      public event ChangedEventHandler Changed;
      public double value
      {
          get { return _value; }
          set 
          {
              _value = value;
              if (Changed != null)
              {
                  Changed(this, EventArgs.Empty);
              }
          }
      }
      private double _value = 0;
  }
  </code></pre>
  
  <p>I also have another Class (StepPulseblaster) which is not serializable and adds an Event Handler</p>
  
  <pre><code>valDouble.Changed += new ChangedEventHandler(sc_PropertyChanged);
  </code></pre>
  
  <p>When i try to serialize the valueDouble Class, there will be an error:</p>
  
  <pre><code>The Type StepPulseblaster is not marked as serializable
  </code></pre>
  
  <p>When i comment the line </p>
  
  <pre><code>valDouble.Changed += ...
  </code></pre>
  
  <p>there will be no error any more. </p>
  
  <p>How can i serialize a class which has some events connected?</p>