Questions tagged [argumentnullexception]

[MSDN] The exception that is thrown when a null reference is passed to a method that does not accept it as a valid argument.

MSDN ArgumentNullException is thrown when a method is invoked and at least one of the passed arguments is null but should never be null.

ArgumentNullException behaves identically to ArgumentException. It is provided so that application code can differentiate between exceptions caused by null arguments and exceptions caused by arguments that are not null. For errors caused by arguments that are not null, see ArgumentOutOfRangeException.

ArgumentNullException uses the HRESULT E_POINTER, which has the value 0x80004003.

For a list of initial property values for an instance of ArgumentNullException, see the ArgumentNullException constructors.

166 questions
-7
votes
2 answers

System.ArgumentNullException: Value cannot be null. Parameter name: source

here my code is its showing the parameter you have passed is null:- [HttpPost] public String Indexhome( IEnumerable Seats ) { if (Seats.Count(x => x.IsSelected) == 0) { return "you didnt select any seats"; } …
Debashish Dwivedi
  • 327
  • 2
  • 5
  • 13
1 2 3
11
12