Tag Info

New answers tagged


There are 2 ways regex are matched against a string: Check if the entire string matches the pattern or find the first match of the pattern. The first is often used for input validation. The second would be used in parsing large portions of text to isolate interesting parts for further parsing. This will return the first match it can find.


It depends. Check out Bart van Ingen Schenau's answer to determine if it's possible to ignore the packages folder at all. Basically: yes, NuGet is designed so that you can ignore the packages folder and NuGet will pull everything from the Internet if it's missing. But should you ignore it? I say: it depends. IMO it's a question of "can we continue working ...


The basic rule for what goes into a source control repository is that you store there everything related to a project that you need to be able to build, test, deploy and execute the project and which can not be generated from items already present in the repository. In other words, if you can throw away the PACKAGE folder and its contents without affecting ...


As I mentionned in an edit of the question, the try-object pattern is the best alternative to this problem.


One solution is to use Null Object Pattern in Module A. Instead of returning null, Module A will return another type that is a 'type-safe' representation of "Nothing".


You can return either a thing or nothing, so somehow B has to know. You can return a list with 0 or 1 element, and B could, for example, treat it uniformaly. In pseudo-code: // Inside one of B's method foreach(x : A.getThings()) { this.doAction(x); }

Top 50 recent answers are included