concept fact in category .net

This is an excerpt from Manning's book Concurrency in .NET.
A fundamental relationship exists between circuit length (CPU physical size) and processing speed: the time required to perform an operation is a cycle of circuit length and the speed of light. Because the speed of light is constant, the only variable is the size of the CPU; that is, you need a small CPU to increase the speed, because shorter circuits require smaller and fewer switches. The smaller the CPU, the faster the transmission. In fact, creating a smaller chip was the primary approach to building faster CPUs with higher clock rates. This was done so effectively that we’ve nearly reached the physical limit for improving CPU speed.
During an interview on Microsoft’s Channel 9 (http://bit.ly/2v8exjV), Erik Meijer, the mind behind Rx, mentioned that F# was an inspiration for the creation of Reactive Extensions. One of the inspiring ideas behind the Reactive framework, composable events, does in fact come from F#.
Figure 13.4 The Fork/Join pattern splits a task into subtasks that can be executed independently in parallel. When the operations complete, the subtasks are joined again. It isn’t a coincidence that this pattern is often used to achieve data parallelism. In fact, there are clearly similarities.
![]()

This is an excerpt from Manning's book C# in Depth.
In this chapter I’ll let the C# compiler do amazing things without telling you how and barely mentioning the what or the why. This is the only time that I won’t explain how things work or try to go one step at a time. Quite the opposite, in fact—the plan is to impress rather than educate. If you read this entire section without getting at least a little excited about what C# can do, maybe this book isn’t for you. With any luck, though, you’ll be eager to get to the details of how these magic tricks work, and that’s what the rest of the book is for.
The topic of generics has a lot of dark corners if you want to know everything about it. The C# language specification goes into a great deal of detail in order to make sure that the behavior is specified in pretty much every conceivable case. But you don’t need to understand most of those corner cases in order to be productive. (The same is true in other areas, in fact. For example, you don’t need to know all the exact rules about definite assignment—you just fix the code appropriately when the compiler complains.)
The obvious examples of this are IEnumerator<T> and (by association) IEnumerable<T>. In fact, these are almost the canonical examples for generic covariance. Together they describe a sequence of values—all you know about the values you see is that each one will be compatible with T, such that you can always write

This is an excerpt from Manning's book Dependency Injection in .NET.
If we unplug the computer from the wall, neither the wall outlet nor the computer breaks down (in fact, if it’s a laptop computer, it can even run on its batteries for a period of time). With software, however, a client often expects a service to be available. If the service was removed, we get a NullReferenceException. To deal with this type of situation, we can create an implementation of an interface that does “nothing.” This is a design pattern known as Null Object,[4] and it corresponds roughly to unplugging the computer from the wall. Because we’re using loose coupling, we can replace a real implementation with something that does nothing without causing trouble.

This is an excerpt from Manning's book IronPython in Action.
His experience with the JVM proved that it was certainly possible to create language runtimes capable of hosting both static and dynamic languages, and he wondered what Microsoft had gotten so wrong. Naturally he explored this by attempting a toy implementation of Python. To his horror, he discovered that, contrary to popular opinion, Python worked well on .NET. In fact, his initial attempt ran the basic Python benchmark pystone 1.7 times faster than CPython.
As with MainForm, the dialog is a subclass of Form. It takes two arguments in the constructor: a string name (the current name of the tab) and a Boolean rename (whether you’re renaming a page or creating a new one). The title of the dialog is set differently depending on which of these two actions is taken—which, in fact, is the only difference between the two uses.

This is an excerpt from Manning's book LINQ in Action.
Other variants of LINQ can be created to provide access to diverse kinds of data sources. Implementations of LINQ will be released by software vendors, and you can also create your own implementations, as you’ll see in chapter 12, which covers LINQ’s extensibility. You can plug a wide array of data sources into LINQ, including the file system, Active Directory, WMI, the Windows Event Log, or any other data source or API. This is excellent because you can benefit from LINQ’s features with a lot of the data sources you deal with every day. In fact, Microsoft already offers more LINQ providers than just LINQ to Objects, LINQ to SQL, and LINQ to XML. Two of them are LINQ to DataSet and LINQ to Entities (to work with the new ADO.NET Entity Framework). We will present these tools in the second and third parts of this book. For now, let’s keep the focus on the big picture.
If you’ve read the preceding chapters attentively, you should now be able to query in-memory collections with LINQ to Objects. There is one problem, though. You may think you know how to query collections, but in reality you only know how to query some collections. The problem comes from the fact that LINQ to Objects was designed to query generic collections that implement the System.Collections.Generic.IEnumerable<T> interface. Don’t get us wrong: most collections implement IEnumerable<T> in the .NET Framework. This includes the major collections such as the System.Collections.Generic.List<T> class, arrays, dictionaries, and queues. The problem is that IEnumerable<T> is a generic interface, and not all classes are generic.
This is all fine, but our example is not complete. We don’t have the flexible query we promised! In fact, we have a small problem. What will happen if the user doesn’t provide values for all the criteria? We won’t get the correct results, because the method was not created to handle blank values.
We need to take this into account and test whether we have values for the criteria. When there is no value for a criterion, we simply exclude the corresponding clause from the query. In fact, if you look at the new version of our method in listing 5.16, you’ll notice that we create the query on the fly by adding clauses one after another.