Is it possible to reference a constructor from a C# XML comment without resorting to the explicit prefixes (like M: or T:)?
For instance, the following yields compilation warnings, because the compiler does not like ".ctor". Trying "PublishDynamicComponentAttribute.#ctor" is no good,
"PublishDynamicComponentAttribute.PublishDynamicComponentAttribute" is no good too.
/// <summary> /// Constructs a new <see cref="PublishEntityAttribute"/> instance. /// </summary> /// <seealso cref="PublishDynamicComponentAttribute..ctor(Type)"/> public PublishEntityAttribute(Type entityFactoryType) : base(entityFactoryType) { }
I am sure the type itself is visible.
So, I am left to use the explicit prefix M:, which removes the compiler verification, so when a type is moved/renamed the cref will be invalid.
Any suggestions?
We cannot refer to the addresses of constructors since we only require the address of a function to call it and they can never be called directly.
A copy constructor defines what copying means,So if we pass an object only (we will be passing the copy of that object) but to create the copy we will need a copy constructor, Hence it leads to infinite recursion. So, A copy constructor must have a reference as an argument.
A constructor is automatically called when an object is created. It must be placed in public section of class. If we do not specify a constructor, C++ compiler generates a default constructor for object (expects no parameters and has an empty body).
You specify a constructor as if you are calling it, but with the types of the arguments instead of values for them:
/// <seealso cref="PublishDynamicComponentAttribute(Type)"/>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With