static void Main(string[] args)
        {
            // GET ALL JUNIOR DEVELOPERS
            var juniors = DevelopersList.Where(dev => dev.Job == JUNIOR);

            // PRINT X'TH ELEMENT OF THE LIST:
            var newList = DevelopersList.Where(dev => dev.Age > 26);

            Console.WriteLine(newList.ElementAtOrDefault(3).FulltName);


            IList mixList = new ArrayList();

            mixList.Add(4);
            mixList.Add("Shalom");
            mixList.Add(91);
            mixList.Add(true);
            mixList.Add(11);
            mixList.Add("Jhonny");
            mixList.Add(19.184);
            mixList.Add(new { Name = "Adam", Age = 30 });

            int    sum      = mixList.OfType <int>().Sum();
            string sentence = mixList.OfType <string>().Aggregate("", (current, next) => current + " " + next);

            Console.WriteLine(sum);
            Console.WriteLine(sentence);
        }
Beispiel #2
0
        public async void GetDevelopers()
        {
            //RestSharp Code Snippet
            var client  = new RestClient("https://api.github.com/search/users?q=language:java%20location:lagos");
            var request = new RestRequest(Method.GET);

            var response = await client.ExecuteAsync(request);

            var content = response.Content;

            developers           = JsonConvert.DeserializeObject <DevelopersList>(content);
            listView.ItemsSource = developers.DevelopersDetails;
        }