C# Tutorial: LINQ

Поделиться
HTML-код
  • Опубликовано: 2 сен 2019
  • In this lesson I go over LINQ and how to use it.

Комментарии • 6

  • @fauzizee7765
    @fauzizee7765 10 месяцев назад +1

    thank you so much. Finishing my diploma with this

  • @tilerboston5973
    @tilerboston5973 8 месяцев назад +1

    this is the best explanation

  • @givolimyerukim
    @givolimyerukim Год назад +1

    tnx for quick review

  • @kvelez
    @kvelez 8 месяцев назад +4

    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; }
    }
    }

  • @rjaditya6865
    @rjaditya6865 3 года назад +1

    It would have been better if you could have spent some more time on this and explained it in a little more detail.

  • @kvelez
    @kvelez 8 месяцев назад +1

    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; }
    }
    }