Something wrong, didn t set the object reference to the instance of the object, what does it mean

Updated on technology 2024-05-19
2 answers
  1. Anonymous users2024-02-10

    Save the information to string s

    string s = "Title:"+ Panel Title text box. text + ","

    Grade:"+ Panel Level drop-down menu. ","

    Pages:"+ Panel Page text box. text + ","

    Book Evaluation:"+ Panel to rate the text. text + ","

    Remarks:"+ Panel Notes text. text + "。";

    + Panel Level drop-down menu. SelectedItem, when not selected, SelectedItem is empty.

    Add before that.

    if (panel level drop-down menu. selecteditem == null) {

    Please select. ");

    return;

    Also: When the contents of the textbox are empty, the text property is"", there will be no null case.

  2. Anonymous users2024-02-09

    Private void book collection button click(object sender, eventargs e).

    Return to the path where the program is located.

    string a = ;

    Create a file to hold the data.

    string b = a + ".dat";

    if (!try will write try here, and then set a breakpoint here, it may be that the text is not filled in the data text value is null, null and characters may be connected to the operation may report an error, when debugging, the main thing is to see what the value of s is.

    Save the information to string s

    string s = "Title:"+ Panel Title text box. text + ","

    Grade:"+ Panel Level drop-down menu. ","

    Pages:"+ Panel Page text box. text + ","

    Book Evaluation:"+ Panel to rate the text. text + ","

    Remarks:"+ Panel Notes text. text + "。";

    using (streamwriter t =

    Write s to a file.

    The save was successful");

    Save failed");

    Write try here, and then set a breakpoint here, it may be that the text is not filled in the data text value is null, null and characters may be connected to the operation may report an error, debugging mainly depends on what the value of s is.

Related questions
7 answers2024-05-19

Yes, fwrite is the same as c, but it can only be a file, not a directory. >>>More