homesupportcreate a simple feed reader console application via c# + .net [tutorial]

a copy of the visual studio project for this applicationcan be found here. the project includes a dll reference to the sample api as well which isdiscussed further here.

the application is comprised of 1 main file “program.cs” which uses the sample api to print your feeds to a windows console, the source is displayed below, you will need to replace the api_key and baseurl values with your own unique api_key and baseurl provided to you:

using system;
using system.collections.generic;
using system.linq;
using system.text;
using sampleclientlibrary;

namespace sample_dotnet_feedreader
{
class program
{
private static void getnewsarticles()
{
string api_key = "your_api_key_here";
string baseurl = "http://api.brafton.com/";

apicontext ac = new apicontext(api_key, baseurl);
//iterate through each news item returned from your feed a print it's id, headline and publishdate on each line
foreach (newsitem ni in ac.news)
{
string id = "";
string headline = ni.headline;
string publishdate = "[" + ni.publishdate.toshortdatestring() + "]";

console.writeline(id + " " + headline + " " + publishdate);
}
}

static void main(string[] args)
{
getnewsarticles();
console.writeline("press any key to exit...");
console.readkey();
}
}
}