だから私は XML からファイルを読んでいますが、これは Debug-Output を使用してかなりうまく機能します。
while (reader.Read())
{
if (reader.NodeType == XmlNodeType.Element && reader.Name == "Note")
{
Note n = new Note();
reader.ReadToFollowing("NoteTitle");
string s = reader.ReadElementContentAsString();
n.NoteTitle = s;
Debug.WriteLine("s " + s);
Debug.WriteLine("n " + n.NoteTitle);
}
}
私の問題はそれです
n.NoteTitle = s;
何もしないので、2 番目のデバッグでは "n " のみが出力され、それ以外は何も出力されませんが、最初のデバッグでは"s Notetitle1"
正しく出力されます。
私の問題は何ですか?
編集: 申し訳ありませんが、NoteTitle の実装:
private string _noteTitle = string.Empty;
public string NoteTitle
{
get { return this._noteTitle; }
set { RaisePropertyChanged("NoteTitle"); }
}