|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace DemoApplication.SampleClasses
{
public class ListHolderClass
{
public List<string> ListOfStrings { get; set; }
public ListHolderClass()
{
ListOfStrings = new List<string>();
}
public override string ToString()
{
StringBuilder sb = new StringBuilder();
foreach (var item in ListOfStrings)
{
sb.AppendLine(item.ToString());
}
return sb.ToString();
}
public static ListHolderClass GetSampleInstance()
{
var inst = new ListHolderClass();
inst.ListOfStrings.Add("Hi");
inst.ListOfStrings.Add("Hello");
return inst;
}
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.