Extension Methods from C.F.Meijers
-
OrderBy(string sortExpression)
Orders a list based on a sortexpression. Useful in object databinding scenarios where the objectdatasource generates a dynamic sortexpression (example: "Name desc") that specifies the property of the object sort on.
-
Left
Returns the first few characters of the string with a length specified by the given parameter. If the string's length is less than the given length the complete string is returned. If length is zero or less an empty string is returned
-
Right
Returns the last few characters of the string with a length specified by the given parameter. If the string's length is less than the given length the complete string is returned. If length is zero or less an empty string is returned
-
Strip
Strip a string of the specified substring or set of characters
-
ToString
returns a formatted string on a nullable date
-
ToString
Returns a formatted string on a nullable double
-
In
Allows you to compare a value to a list of values analogous to the 'In' statement in sql. This makes for a very friendly syntax that is (IMHO) superior to a list of 'or' clauses. Instead of : if (s=="John" || s=="Peter" or s=="Paul") one can write if (s.In("John","Paul","Peter"))
-
Upgrade
Upgrades an ArrayList to a generic List
-
Upgrade
Upgrades a hashtable to a generic dictionary