Class HelpersExtensions
Extension methods.
public static class HelpersExtensions
- Inheritance
-
objectHelpersExtensions
Methods
Append(StringBuilder, params object[])
Appends the specified items to the string builder.
public static void Append(this StringBuilder sb, params object[] parts)
Parameters
sbStringBuilderString builder object
partsobject[]Objects to append
Join(IEnumerable<string>, string)
Joins the given list of values with a given separator.
public static string Join(this IEnumerable<string> values, string separator)
Parameters
valuesIEnumerable<string>Values
separatorstringSeparator
Returns
- string
Remarks
Null entries from input are skipped. Returns empty string if values is null. Consider using framework method string.Join(string, System.Collections.Generic.IEnumerable<string>)
Truncate(string, int)
Truncates string to specified length.
public static string Truncate(this string str, int length)
Parameters
strstringGiven string
lengthintLength to truncate string to
Returns
- string
Truncated string.
TryReadXml(DataSet, string)
Tries to read xml and load the data from it to the DataSet via standard .NET method. If the load fails, it removes all the forbidden whitespace characters and tries it again.
[Obsolete("Method was not intended for public use and will be removed in the next version.")]
public static void TryReadXml(this DataSet ds, string xml)
Parameters
dsDataSetDataSet to fill
xmlstringXML with data