DelimitedStringOptions<T> Class
Definition
Configuration options for DelimitedString.
public class DelimitedStringOptions<T> : IParameterObject
Type Parameters
TThe type of the object to convert.
- Inheritance
-
DelimitedStringOptions<T>
- Implements
Examples
The following example demonstrates how to use
using System;
using System.Globalization;
using Cuemon;
namespace Contoso.Telemetry;
public sealed class DelimitedStringOptionsOfTExample
{
public static void Run()
{
var options = new DelimitedStringOptions<int>
{
Delimiter = " | ",
StringConverter = number => number.ToString("X2", CultureInfo.InvariantCulture)
};
int[] numbers = { 1, 2, 3, 4 };
string hex = DelimitedString.Create(numbers, setup =>
{
setup.Delimiter = options.Delimiter;
setup.StringConverter = options.StringConverter;
});
Console.WriteLine(hex);
}
}
Constructors
| Name | Description |
|---|---|
| DelimitedStringOptions() | Initializes a new instance of the DelimitedStringOptions<T> class. |
Properties
| Name | Description |
|---|---|
| Delimiter | Gets or sets the delimiter specification. |
| StringConverter | Gets or sets the function delegate that converts |