namespace System.ComponentModel {
-#if NET_2_0
[Serializable]
-#endif
public class WarningException : SystemException
{
private string helpUrl;
this.helpTopic = helpTopic;
}
-#if NET_2_0
public WarningException ()
: base (Locale.GetText ("Warning"))
{
protected WarningException (SerializationInfo info, StreamingContext context)
: base (info, context)
{
- helpTopic = info.GetString ("HelpTopic");
- helpUrl = info.GetString ("HelpUrl");
+ try {
+ helpTopic = info.GetString ("helpTopic");
+ helpUrl = info.GetString ("helpUrl");
+ }
+ catch (SerializationException) {
+ //For compliance with previously serialized version:
+ helpTopic = info.GetString ("HelpTopic");
+ helpUrl = info.GetString ("HelpUrl");
+ }
}
[SecurityPermission (SecurityAction.Demand, SerializationFormatter = true)]
if (info == null)
throw new ArgumentNullException ("info");
- info.AddValue ("HelpTopic", helpTopic);
- info.AddValue ("HelpUrl", helpUrl);
base.GetObjectData (info, context);
+ info.AddValue ("helpTopic", helpTopic);
+ info.AddValue ("helpUrl", helpUrl);
}
-#endif
public string HelpTopic {
get {