Advertisement
Guest User

Untitled

a guest
Oct 15th, 2019
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Web;
  5.  
  6. namespace WebApplication3.Models
  7.  
  8. {
  9. public class Article
  10. {
  11. public Article[] GetArticles()
  12. {
  13. Article[] articles = new Articles[3];
  14. for(int i=0;i<3;i++)
  15. {
  16. Article article = new Article();
  17. article.Id = i;
  18. article.Title = "Articol " + (i + 1).ToString();
  19. article.Content = "Continut articol" + (i + 1).ToString();
  20. article.Data = DateTime.Now;
  21. articles[i] = article;
  22. }
  23. return articles;
  24. }
  25. }
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement