Quick CodeDOM Question

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: Vagmi Mudumbai (VagmiDOTMudumbai_at_gmail.com)
Date: 11/25/04


Date: Thu, 25 Nov 2004 04:45:36 -0800

Hi,

I am working on CodeDOM to generate a more usable class to serialize
and deserialize WXS files. I have hit the wall at a pretty early
stage. :-( I am attempting to change the member public fields into
properties. I have written a generic field to property code for that.
It is almost straight out of the link that you gave me. :-)

But that always creates code with the virtual keyword. I am not sure
on how to get rid of it. For example this is the sample Icon class
created.

public class Icon {
     private string _id;
     private string _src;
     /// <remarks/>
     [System.Xml.Serialization.XmlAttributeAttribute()]
     public virtual string Id {
        get {
           return this._id;
        }
        set {
           this._id = value;
        }
     }
     /// <remarks/>
     [System.Xml.Serialization.XmlAttributeAttribute()]
     public virtual string src {
        get {
           return this._src;
        }
        set {
           this._src = value;
        }
     }
}

public virtual string Id ...
public virtual string src ...

As you can see the properties above have the ugly 'virtual' keyword. I
am not sure how to get rid of it.

--
Vagmi
http://geekswithblogs.net/vagmi.mudumbai
http://installneo.blogspot.com