Skip to content

Instantly share code, notes, and snippets.

@shoupn
Created February 15, 2019 20:05
Embed
What would you like to do?
//This is how you declare a class signature which uses a Generic Type
public class GenericList<Type>
{
public void Add(Type input)
{
//logic for adding to list..
Console.WriteLine(input.ToString());
}
}
}
public class GenericFields<Type>
{
private Type _value;
public GenericFields(Type value)
{
this._value = value;
}
// using properties
public Type value
{
// using accessors
get
{
return this._value;
}
set
{
this._value = value;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment