c# throw new invalidoperationexception