About 16,800 results
Open links in new tab
  1. Determining the object that caused a null reference exception?

    Sep 1, 2021 · Frequently in applications we encounter situations that could throw a NullReferenceException; for example, assuming the following method's argument is a user …

  2. c# - Is it unreasonable to expect Any () *not* to throw a null ...

    Sep 18, 2018 · When you create an extension method you can, of course, call it on null.But, unlike an instance method call, calling it on null doesn't have to throw a …

  3. .net - Why doesn't "object reference not set to an instance of an ...

    Oct 26, 2012 · We're launching a system, and we sometimes get the famous exception NullReferenceException with the message Object reference not set to an instance of an object.

  4. How does throwing an ArgumentNullException help?

    A NullReferenceException is not particularly meaningful, because it could mean about everything. Without looking at where the exception was thrown (and the code might not be available to …

  5. SingleOrDefault and FirstOrDefault Methods in LINQ to SQL

    Feb 20, 2014 · We define NullReferenceException as a parameter in the catch block that represents that this catch block executes when a null value is set for an object and data is …

  6. If null is a billion dollar mistake, what is the solution to represent ...

    Jul 27, 2020 · I think if null is a built-in concept of your language you cannot get rid of it and have to deal with it. Your language might not offer something like Optionals. But you can aim for …

  7. Understanding the SynchronizationContext in .NET with C#

    Jul 26, 2020 · Download source - 25.2 KB Introduction Here, I intend to shed some light on another dark corner of the .NET framework - synchronization contexts. I will take you through …

  8. c# - Why assert for null on a object before asserting on some of its ...

    Feb 23, 2023 · You'd get your test framework specific exception that's thrown by the 'NotBeBull' assertion instead of the generic 'nullReferenceException'. I don't feel this is useful as you are …

  9. Creating WinForms Custom Controls with Visual Studio 2022 …

    Sep 6, 2022 · Download example - 13.6 KB Introduction This is a short demonstration of creating custom button in .NET6 (Core). One property will be added which will open an empty form, …

  10. The meaning of 'null' - CodeProject

    May 15, 2017 · Discover the meaning of null in programming, its implications, and how to effectively handle it in your code.