Love it! Love it. Loved it so much! I enjoyed every bit of your video and really appreciate you giving the efforts to convey such great content for educational purpose
using System; using System.Collections.Generic; using System.Linq; namespace ConsoleApp1 { internal class Program { static void Main(string[] args) { var myBooks = new List() { new Book() {Title = "C#", Price = 9.4}, new Book() {Title = "C++", Price = 5.4}, }; var books = from book in myBooks where book.Title == "C#" select book; books.ToList().ForEach(book => { Console.WriteLine(book.Title); }); } } class Book { public string Title { get; set; } public double Price { get; set; } } }
using System; using System.Collections.Generic; using System.Linq; namespace ConsoleApp1 { internal class Program { static void Main(string[] args) { var myBooks = new List() { new Book() {Title = "C#", Price = 9.4}, new Book() {Title = "C++", Price = 5.4}, }; var books = from book in myBooks orderby book.Price descending select book; books.ToList().ForEach(book => { Console.WriteLine(book.Title); }); } } class Book { public string Title { get; set; } public double Price { get; set; } } }
Taught more in 7 mins than my lecturer in an hour.
Love it! Love it. Loved it so much! I enjoyed every bit of your video and really appreciate you giving the efforts to convey such great content for educational purpose
thank you so much. Finishing my diploma with this
this is the best explanation
tnx for quick review
using System;
using System.Collections.Generic;
using System.Linq;
namespace ConsoleApp1
{
internal class Program
{
static void Main(string[] args)
{
var myBooks = new List()
{
new Book() {Title = "C#", Price = 9.4},
new Book() {Title = "C++", Price = 5.4},
};
var books = from book in myBooks
where book.Title == "C#"
select book;
books.ToList().ForEach(book => { Console.WriteLine(book.Title); });
}
}
class Book
{
public string Title { get; set; }
public double Price { get; set; }
}
}
It would have been better if you could have spent some more time on this and explained it in a little more detail.
using System;
using System.Collections.Generic;
using System.Linq;
namespace ConsoleApp1
{
internal class Program
{
static void Main(string[] args)
{
var myBooks = new List()
{
new Book() {Title = "C#", Price = 9.4},
new Book() {Title = "C++", Price = 5.4},
};
var books = from book in myBooks
orderby book.Price descending
select book;
books.ToList().ForEach(book => { Console.WriteLine(book.Title); });
}
}
class Book
{
public string Title { get; set; }
public double Price { get; set; }
}
}