Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- namespace Account_Manager
- {
- public class category
- {
- int id;
- string name;
- int color;
- public category()
- {
- ;
- }
- public category(int id, string name, int color)
- {
- this.id = id;
- this.name= name;
- this.color = color;
- }
- }
- public class categoryList
- {
- private List<category> _categoryList = new List<category>();
- public static categoryList cat= new categoryList();
- public static async Task<List<category>> GetCategoryListAsync()
- {
- await cat.getData();
- return cat._categoryList;
- }
- public async Task getData()
- {
- cat._categoryList.Add(new category(1, "Facebook", 1));
- cat._categoryList.Add(new category(1, "Facebook", 1));
- cat._categoryList.Add(new category(1, "Facebook", 1));
- cat._categoryList.Add(new category(1, "Facebook", 1));
- cat._categoryList.Add(new category(1, "Facebook", 1));
- cat._categoryList.Add(new category(1, "Facebook", 1));
- cat._categoryList.Add(new category(1, "Facebook", 1));
- cat._categoryList.Add(new category(1, "Facebook", 1));
- cat._categoryList.Add(new category(1, "Facebook", 1));
- }
- public async Task addData(category val)
- {
- cat._categoryList.Add(val);
- await saveCateforyList();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement