In my Visual Studio 2008.NET C # project, I have one property and the debugger shows open and immediately closed curly braces "{}". I believe this is an uninitialized (I) list, but why does it not show "null" or "unitialized". What does "{}" mean?
br, Milan.
The most likely reason is that the type of value in question overrides the .ToString() method and returns an empty string. This will trigger the display {}, as C # EE completes the return of .ToString inside {} 's
.ToString()
If you want to change the value shown in the debugger, you can control it using DebuggerDisplayAttribute . Instead, you can override the .ToString() method. But this may affect other areas of your applications.
This may indicate a value of System.DBNull
System.DBNull
You can check it as follows:
foreach (var val in datarow.ItemArray) { if (val == DBNull.Value) { var item = val; } }
Source: https://habr.com/ru/post/1313211/More articles:Improving Variable Parameter Methods Using .NET Generics - genericsPreventing reinstallation of controls in C #? - performanceRails nested form with nested resource: update belongs_to association when creating a new has_many - ruby-on-railsUsing XSL to Maintain Total - xmlDisable image above button - htmlReordering a div using jquery - javascriptis there any Cocoa control code I can use that acts like a patch bay? - objective-cASP.NET - load user control using AJAX? - ajaxCreating a quartz composer style interface - objective-cWhy can't I declare a delegate at the function level? - c #All Articles