How To Reference To A Class In The Other Namespaces (Projects)

Feb 26, 2010 at 10:43 AM

I'm wondering how to reference to a class in other namespaces projects.

For example:

    /// <summary>
    /// Represents types that are associated with
    /// <see cref="AnotherNamespace.ClipboardController"/>.
    /// </summary>
    public enum CacClipboardItemType
        /// <summary>
        /// The current clipboard contains <see cref="Element2D"/>s.
        /// </summary>

        /// <summary>
        /// The current clipboard contains <see cref="Sheet2D"/>s.
        /// </summary>

        /// <summary>
        /// The current clipboard contains <see cref="Layer2D"/>s.
        /// </summary>

In the above example, AnotherNamespace.ClipboardController will generate a compile warning:

XML comment on 'CacaniData.CacClipboardItemType' has cref attribute AnotherNamespace.ClipboardController' that could not be resolved
Feb 26, 2010 at 7:36 PM

You can fully qualify the name to work around the issue if the compiler can't find the reference.  To do so, you need to prefix the reference with an appropriate letter indicating its type followed by a colon (N: for namespace, T: for type, E: for Event, F: for field, M: for method, or P: for a property) and then specify the full namespace and member name.  Assuming ClipboardController is a type, the fully qualified name would be "T:AnotherNamespace.ClipboardController".



Feb 27, 2010 at 4:10 AM


Your solution works perfect. Thanks.