It is a common practice to validate function arguments before running actual code. Usually validation looks like that: public void Update(Car entity) { if(entity ==null) throw new ArgumentNullException("entity"); } There is nothing wrong with this code, however we have to repeat this piece of code in every function. Of course we could create some helper class for argument validation and call approperiate validation function before launching...
Strona głównaWindows
Windows 4434 dni, 1 godzinę, 28 minut temu 34 pokaż kod licznika zwiń