Data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 7387c8f97b
commit cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions

View file

@ -0,0 +1,4 @@
interface IEatable
{
void Eat();
}

View file

@ -0,0 +1,6 @@
using System.Collections.Generic;
class FoodBox<T> where T : IEatable
{
List<T> food;
}

View file

@ -0,0 +1,7 @@
class Apple : IEatable
{
public void Eat()
{
System.Console.WriteLine("Apple has been eaten");
}
}

View file

@ -0,0 +1,15 @@
using System.Collections.Generic
class FoodMakingBox<T> where T : IEatable, new()
{
List<T> food;
void Make(int numberOfFood)
{
this.food = new List<T>();
for (int i = 0; i < numberOfFood; i++)
{
this.food.Add(new T());
}
}
}