Argument Type is not CLS-compliant...class structure
<p>I have a class as follows...The idea is to do some logic processing and return a read only object.</p>

<pre><code>public class Test
{
    public object property1 { get; private set; }
    public string property2 { get; private set; }


    private Test(){}

    public static Test GetTest(XDocument document)
    {
        if (document== null)
            return null;

        return new Test 
        {
            property1 = l_document.Element("something").value,
            property2 = l_document.Element("anotherthing").value,
        };
    }
}
</code></pre>

<p>If I use the above test object as paramerter in a function, I get a message Argument Type is not CLS-compliant... Any suggestions?
Any other way I can achieve a read only object?</p>

<p>Thanks,
Kamar</p>
