Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Threading;
- using System.IO;
- using System.Text;
- using System.Threading.Tasks;
- namespace IMJunior
- {
- class User
- {
- }
- public class Program
- {
- static void Main()
- {
- Repository<User> users = new Repository<User>();
- users.GetAll();
- UserRepository repo = new UserRepository();
- }
- }
- public class Repository<T>
- {
- private T[] _data;
- public T GetById(int id)
- {
- return _data[id];
- }
- public T[] GetAll()
- {
- return _data;
- }
- }
- class UserRepository : Repository<User>
- {
- public User GetByName()
- {
- throw new NotImplementedException();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement