Hi
My problem is that I've stored my keyword and the counted results in an object, but I'm having trouble returning the results in the object, right now it's just returning the object itself.
Here's my code
public class airport
My problem is that I've stored my keyword and the counted results in an object, but I'm having trouble returning the results in the object, right now it's just returning the object itself.
Here's my code
public class airport
{
public long count { get; set; }
public string airName { get; set; }
public team(String name, long count)
{
this.count = count;
this.airName = name;
}
ArrayList AirportDiscussionInput = new ArrayList(); AirportDiscussionInput.Add("Heathrow");
AirportDiscussionInput.Add("Stanstead");
AirportDiscussionInput.Add("London City Airport");
Stack myStack = new Stack(); foreach (string keyword in AirportDiscussionInput)
{
var searchParameter = Search.GenerateSearchTweetParameter(keyword);
searchParameter.Lang = Language.English;
searchParameter.SearchType = SearchResultType.Recent;
//searchParameter.Since = new DateTime(2014, 11, 26);
searchParameter.MaximumNumberOfResults = 10;
var tweets = Search.SearchTweets(searchParameter);
var TweetCount = tweets.LongCount();
Airport air = new Airport(keyword, TweetCount);
myStack.Push(air);
Console.WriteLine(air.airName);
Console.WriteLine(air.count);
string json = JsonConvert.SerializeObject(myStack);
Firstlbl.Text = json.ToString();
{
object result1 = myStack.Pop();
secondlbl.Text =result1.ToString();