- In your console application, add a new class called DotNet. To this class, add a property called AvailableDatatype:
public class DotNet { public string AvailableDatatype { get; set; } }
- In the main program class, add a new static action event called types. Basically, this is just a delegate and will receive some value; in our case, the available .NET data types:
class Program { // Static action event static event Action<string> types; static void Main(string[] args) { } }
- Inside void Main, create a List<DotNet> class called lstTypes. Inside this list, add several values of type DotNet class. Here, we will just add hardcoded data of some of the data types in .NET:
List<DotNet> lstTypes = new List<DotNet>(); ...