C # memo

Source: Internet
Author: User

Today, user found some bugs in my wipthreesites. It made me feel shy!
Then I began to debug my system. Finally, I found three bugs in my programm. there bugs looked were not worthy of mention.

(1) When the data reloaded, error takes place.
The information from the database was modified, and then wocould been reloaded, when the datasource was binged to the DataGrid again, the message said: some column can't been found, and then system was exited immediately.
If make the datasource null before reloading, this bug will be removed.
This. Maid = NULL;
This. Maid = DV;

(2) acceptchange ()
In my programm, I use this sentence: Ds. Table [0]. Rows [0]. Delete (); for deleting a row.
But when I saved the changed information, I found that the row I had deleted was still existed.
If you want to delete the row, you should add a sentence below the delete ();
DS. Table [0]. Row [I]. Delete ():
DS. acceptchanges ();
(3) compare
Make a compare with a and B, if a = B, then do something; it looks so easy, but you will make a mistake if you are careless. in order to remove space, you should do like this:
If (A. Trim () = B. Trim ())
{// Do something}

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.