Advertisement
tankcr

Untitled

Jun 13th, 2014
213
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.99 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. using System.Net;
  7. using System.IO;
  8.  
  9. namespace ROD_Deck_Builder
  10. {
  11.     public class Pagedata
  12.     {
  13.         string pageData;
  14.  
  15.         public string PageData
  16.         {
  17.             get { return pageData; }
  18.             set { pageData = value; }
  19.         }
  20.  
  21.         public Pagedata()
  22.         {
  23.  
  24.         }
  25.     }
  26.     public class GetPage
  27.     {
  28.         public static Pagedata GetPageData()
  29.         {
  30.             Pagedata pages = new Pagedata();
  31.             WebRequest request = WebRequest.Create("http://reignofdragons.wikia.com/wiki/All");
  32.             WebResponse response = request.GetResponse();
  33.             Stream data = response.GetResponseStream();
  34.             pages = String.Empty;
  35.             using (StreamReader sr = new StreamReader(data))
  36.             {
  37.                 pages = sr.ReadToEnd();
  38.             }
  39.             return pages;
  40.         }
  41.  
  42.     }
  43. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement