The following error message imposes that the number of constructor arguments was insufficient, or it wouldn't match:
Furthermore, the parameter tooltip is giving no information about the constructor itself but about the surrounding method:
After doing some investigation in the WPF source I found that the TextPointer class does not provide any public constructor at all but only internal constructors.
So, the current error message and Intellisense tooltip both seem quite misleading and confusing.
Desired Situation
I suggest to …
alter the error message to not put focus on the number of arguments but instead to read "{ClassName} does not provide any constructor that's available for this protection level",
don't have Intellisense suggest/provide the corresponding class name after new if no potential constructor is available.
I'm writing a library for WPF.
In the cause of writing I noticed the following:
Current Situation
The following error message imposes that the number of constructor arguments was insufficient, or it wouldn't match:
Furthermore, the parameter tooltip is giving no information about the constructor itself but about the surrounding method:
After doing some investigation in the WPF source I found that the
TextPointer
class does not provide any public constructor at all but only internal constructors.So, the current error message and Intellisense tooltip both seem quite misleading and confusing.
Desired Situation
I suggest to …
new
if no potential constructor is available.