.Net9.0 c# Microsoft.Data.SqlClientを使用していますが DataGridViewにBindingSourceを使用してDataTableをバインドしています。 CellContentClickイベント中にDataTableのデータを更新して BindingSourceのResetBindingsメソッドを実行すると CellContentClickイベントが終了したタイミングで System.NullReferenceException: 'Object reference not set to an instance of an object.' が発生します。
> CellContentClickイベント中にDataTableのデータを更新して > BindingSourceのResetBindingsメソッドを実行すると > CellContentClickイベントが終了したタイミングで > System.NullReferenceException: 'Object reference not set to an instance of an object.' > が発生します。 例外発生時に StackTrace の内容がどうなっているか、提示することはできますか? もしくは、「第三者が実験可能な最小限の検証用コード」を添付することは可能でしょうか。 .NET はソースコードが公開されているため、そこから何かヒントが得られるかもしれません。
----- JIS X 3015:2008 "プログラム言語C#" [October 2008] 「6 頭字語及び略語」 より引用: > C#は,LATIN CAPITAL LETTER C (U+0043)の次に > NUMBER SIGN # (U+000D)を書く。 ----- ISO/IEC 23270:2018 "Information technology -- Programming languages -- C# (Third edition)" [December 2018] 「4. Acronyms and abbreviations」 および ECMA-334:2023 "C# language specification (7th edition)" [December 2023] 「Introduction」 より引用: > The name C# is written as the LATIN CAPITAL LETTER C (U+0043) > followed by the NUMBER SIGN # (U+000D).