C # WPF VS2012 a call to a type "" constructor that conforms to a specified binding constraint raises an exception issue what is the cause of the workaround

Source: Internet
Author: User

Run the program times throws an exception when a call to the type "xx.xxx" is executed that conforms to the specified binding constraint

Xx.xxx represents a namespace. class

namespace test{//<summary>///    Test.xaml Interactive logic///</summary> public    partial class Test : Test   {public        Test ()        {            InitializeComponent ();           Error location throws an exception when the constructor of type "" executes a call that conforms to the specified binding constraint         }}    }

Debug discovery is caused by incorrect reference location of the file, such as when the class is initialized, the database is called, the database name, user name, or password is incorrect, and the database connection is not.

Workaround:

Check the path to the configuration file, for example, with the correct database name, user name, or password.

Solution Ideas:

Single-step debugging, positioning error specific location;

Check the code to see if the file path and the configuration information for the files in the code are present and correct.

C # WPF VS2012 a call to a type "" constructor that conforms to a specified binding constraint raises an exception issue what is the cause of the workaround

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.