Click or drag to resize

LogWriteT Method (ListT, String, String)

Writes a list of data items

Namespace:  SIC.Test.Helper
Assembly:  SIC.Test.Helper (in SIC.Test.Helper.dll) Version: 19.1.23.1 (19.1.23.622)
Syntax
public void Write<T>(
	List<T> pList,
	string pFieldLabelText,
	string pFieldValue = ""
)

Parameters

pList
Type: System.Collections.GenericListT
Data list with data items to write
pFieldLabelText
Type: SystemString
Label field or text field of value
pFieldValue (Optional)
Type: SystemString
Optional. Value field

Type Parameters

T
Class of data item
Examples
A list with two data items

           List<TestDataClass> lListTestDataClass = new List<TestDataClass>();
           lListTestDataClass.Add(new TestDataClass("Surname", "Franz"));
           lListTestDataClass.Add(new TestDataClass("Family name", "Schönbächler"));

           this.Log.Write(lListTestDataClass, "Label", "Value");
Result
Surname:          Franz
Family name:      Schönbächler
Test Data Class
private class TestDataClass
{
    public TestDataClass() { }
    public TestDataClass(string pLabel, string pValue) { this.Label = pLabel; this.Value = pValue; }
    public string Label { get; set; }
    public string Value { get; set; }
}
See also Write(Object, String, String)
See Also