Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Cross-platform UI Development with Xamarin.Forms

You're reading from   Cross-platform UI Development with Xamarin.Forms

Arrow left icon
Product type Paperback
Published in Aug 2015
Publisher
ISBN-13 9781784391195
Length 330 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Paul Johnson Paul Johnson
Author Profile Icon Paul Johnson
Paul Johnson
Arrow right icon
View More author details
Toc

Table of Contents (22) Chapters Close

Cross-platform UI Development with Xamarin.Forms
Credits
About the Author
Acknowledgments
About the Reviewers
www.PacktPub.com
Preface
1. In the Beginning… 2. Let's Get the Party Started FREE CHAPTER 3. Making It Look Pretty and Logging In 4. Making Your Application Portable 5. Data, Generics, and Making Sense of Information 6. A View to a Kill 7. Connect Me to Your Other Services 8. What a Bind! 9. Addressing the Issue 10. This is the World Calling… 11. A Portable Settings Class 12. Xamarin Forms Labs 13. Social Media into the Mix 14. Bringing It All Together Index

Too much information!


Using * within the SQL query has an unfortunate drawback. It retrieves everything based on the parameters passed into the query. This could mean hundreds of objects returned to List.

As previously discussed, help is at hand. That help is in the form of LINQ.

Getting Linq'd

It should become apparent that LINQ is a powerful addition to the programmer's arsenal. To quote the grandfather of telesales, Billy Mays—but wait, there's more!

Finding data with LINQ

There are six ways of finding data within a collection:

  • Where

  • First and FirstOrDefault

  • Single and SingleOrDefault

  • Select

  • SelectMany

  • Last and LastOrDefault

Where

Where allows searching a collection based on any parameter within the collection. This will result in List<T> or IEnumerable<T>. If .ToList() is omitted, IEnumerable is generated:

var demoList = otherList.Where(t=>t.something == "foo");
var demoList = otherList.Where(t=>t.something == "foo").ToList();

First and FirstOrDefault

These two LINQ methods...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image