{"repo":"oliverbooth/X10D","free":true,"listed":false,"github":"https://github.com/oliverbooth/X10D","clone":"git clone https://github.com/oliverbooth/X10D.git","description":"Extension methods on crack.","language":"C#","stars":29,"topics":["dotnet","extension-methods","unity"],"license":"MIT","category":"game-templates","readme_excerpt":"About X10D (pronounced extend ), is a .NET package that provides extension methods for numerous types. The purpose of this library is to simplify a codebase by reducing the need for repeated code when performing common operations. Simplify your codebase. Take advantage of .NET. Use extension methods. (I'm also dogfooding this library, so there's that.) What are extension methods? Extension methods are a clever .NET feature that augment existing types with new functionality. They are defined as static methods in a static class, and are called as if they were instance methods on the type they are extending. Take, for example, the following code: This will print !dlrow ,olleH to the console. The Reverse method is defined in the StringExtensions class, yet is called as if it were an instance method on the str variable, even though it's not. Why use extension methods? Extension methods were introduced when LINQ was added to .NET. LINQ is a set of extension methods that provide a way to query, filter, and transform data. If you were to access LINQ's methods statically, you would have to write code like this: And if you wanted to one-line this, you'd have to write this: This is a lot of code to write, and it's not very readable. The nested method calls make it incredibly difficult to follow. However, because LINQ is implemented as extension methods, you can write the following code instead: Because the methods are called as if they were instance methods on IEnumerable , they can be ","default_branch":null,"files":null,"tree":[],"storefront":"/r/oliverbooth","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/oliverbooth/X10D/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}