Generic Types
Learn about classes that accept type parameters.
We'll cover the following...
Introduction
Consider the following Holder
class:
public class Holder
{
public string[] Items { get; private set; }
public Holder(int holderSize)
{
Items = new string[holderSize];
}
public override string ToString()
{
string result = "Items inside: ";
foreach (var item in Items)
{
result = result + item + " ";
...Create a free account to view this lesson.
By signing up, you agree to Educative's Terms of Service and Privacy Policy