title: XmlIgnore ONLY in Serialization
body: <pre><code>        private string _password;
  
          public string Password
          {
              get 
              {
                  return _password; 
              }
              set
              {
                  if (_password != value)
                  {
                      _password = PasswordEncryptor.Encode(value);
                      OnPropChanged("Password");                
                  }
              }
          }
  </code></pre>
  
  <p><code>PasswordEncryptor</code> is a class where I call the <code>Encode</code> method to encode. And after the <code>Password</code> is encoded, it is serialized by <code>XmlSerializer</code> to a file in disk. However, every time when the program starts, the file is deserialized, and in <code>set</code>, <code>PasswordEncryptor.Encode()</code> encodes the <code>Password</code> again. Is there a way I can <code>[XmlIgnore]</code> it ONLY in deserialization?</p>