售价: ¥414.00 待定配送费
前翻 后翻
正在播放... 已暂停   您正在聆听的 Audible 音频版本的样品。
了解更多信息
查看全部 3 张图片

LINQ to Objects Using C# 4.0: Using and Extending LINQ to Objects and Parallel LINQ (PLINQ) (英语) 平装 – 2010年3月12日

| 天天低价·正品质优
|
分享
广告

显示所有 格式和版本 隐藏其他格式和版本
亚马逊价格
全新品最低价 非全新品最低价
平装
"请重试"
¥414.00
¥414.00
促销信息: 满减 买满 ¥200.00 立减 ¥30.00 共1个促销

 

click to open popover

商品促销和特殊优惠
  • 买满 ¥200.00 立减 ¥30.00: 满足条件自动优惠

无需Kindle设备,下载免费Kindle阅读软件,即可在您的手机、电脑及平板电脑上畅享阅读。

  • iPhone/iPad/Mac
  • Android手机或平板电脑

请输入您的手机号码,获取Kindle阅读软件的下载链接。



基本信息

  • 出版社: Addison-Wesley Professional; 1 (2010年3月12日)
  • 丛书名: Addison-Wesley Microsoft Technology Series
  • 平装: 336页
  • 语种: 英语
  • ISBN: 0321637003
  • 条形码: 9780321637000, 0785342637007
  • 商品尺寸: 17.5 x 1.8 x 22.9 cm
  • 商品重量: 522 g
  • ASIN: 0321637003
  • 用户评分: 分享我的评价
  • 亚马逊热销商品排名: 图书商品里排第2,872,991名 (查看图书商品销售排行榜)
  • 您想告诉我们您发现了更低的价格?

商品描述

作者简介

Troy Magennis is a Microsoft C# MVP and a keen traveler who currently works for Travelocity, which manages the travel and leisure websites travelocity.com, lastminute.com, and zuji. As Vice President of Architecture, he leads a talented team of architects spread across four continents, committed to being the traveler’s champion. Technology has always been a passion. After cutting his teeth on early 8-bit personal computers, Troy moved into electronic engineering (assembly language coding), which later led to positions in software application development and architecture for some of the most prominent corporations in automotive, banking, and online commerce. Troy’s first exposure to LINQ was in 2006 when he took a sabbatical to learn it and became hooked, ultimately leading him to publish the popular HookedOnLINQ website.

目录

Foreword . . . x

Preface . . . xii

Acknowledgments . . . xix

About the Author . . . xx

Chapter 1: Introducing LINQ . . . 1

What Is LINQ? . . . 1

The (Almost) Current LINQ Story . . . 3

LINQ Code Makeover–Before and After Code Examples . . . 5

Benefits of LINQ . . . 12

Summary . . . 15

References . . . 15

Chapter 2: Introducing LINQ to Objects . . . 17

LINQ Enabling C# 3.0 Language Enhancements . . . 17

LINQ to Objects Five-Minute Overview . . . 30

Summary . . . 39

References . . . 39

Chapter 3: Writing Basic Queries . . . 41

Query Syntax Style Options . . . 41

How to Filter the Results (Where Clause) . . . 49

How to Change the Return Type (Select Projection) . . . 54

How to Return Elements When the Result Is a Sequence (Select Many) . . . 59

How to Get the Index Position of the Results . . . 61

How to Remove Duplicate Results . . . 62

How to Sort the Results . . . 63

Summary . . . 73

Chapter 4: Grouping and Joining Data . . . 75

How to Group Elements . . . 75

How to Join with Data in Another Sequence . . . 93

Summary . . . 119

Chapter 5: Standard Query Operators . . . 121

The Built-In Operators . . . 121

Aggregation Operators–Working with Numbers . . . 123

Conversion Operators–Changing Types . . . 131

Element Operators . . . 144

Equality Operator–SequenceEqual . . . 153

Generation Operators–Generating Sequences of Data . . . 155

Merging Operators . . . 159

Partitioning Operators–Skipping and Taking Elements . . . 160

Quantifier Operators–All, Any, and Contains . . . 164

Summary . . . 171

Chapter 6: Working with Set Data . . . 173

Introduction . . . 173

The LINQ Set Operators . . . 174

The HashSet<T> Class . . . 185

Summary . . . 192

Chapter 7: Extending LINQ to Objects . . . 195

Writing a New Query Operator . . . 195

Writing a Single Element Operator . . . 196

Writing a Sequence Operator . . . 208

Writing an Aggregate Operator . . . 216

Writing a Grouping Operator . . . 222

Summary . . . 232

Chapter 8: C# 4.0 Features . . . 233

Evolution of C# . . . 233

Optional Parameters and Named Arguments . . . 234

Dynamic Typing . . . 243

COM-Interop and LINQ . . . 251

Summary . . . 260

References . . . 260

Chapter 9: Parallel LINQ to Objects . . . 261

Parallel Programming Drivers . . . 261

Multi-Threading Versus Code Parallelism . . . 264

Parallelism Expectations, Hindrances, and Blockers . . . 267

LINQ Data Parallelism . . . 271

Writing Parallel LINQ Operators . . . 289

Summary . . . 301

References . . . 301

Glossary . . . 303

Index . . . 307

商品评论

在亚马逊中国上尚未有买家评论。
5 星
4 星
3 星
2 星
1 星

此商品在美国亚马逊上最有用的商品评论 (beta) (可能包括"Early Reviewer Rewards Program"的评论)

美国亚马逊: 平均4.0 星 16 条评论
6/6 人认为此评论有用
平均2.0 星 Good writing, Kindle edition is the worst excuse for an eBook I've seen yet 2013年3月2日
评论者 Steven - 已在美国亚马逊上发表
版本: Kindle电子书 已确认购买
If you are looking to learn just about all the LINQ syntax you'll ever likely need, then this is the book for you. Troy writes in a very clean and approachable style, making it easy to learn the material. I really like how the author doesn't beat around the bush, he gets straight to the point, which is why this book weighs in at a slim 330-ish pages. I really grow tired of reading 900+ page tomes all the time, so this was certainly a welcome break. As far as the raw material is concerned, this is a 5 star book, but there's one glaring flaw if you go the eBook route:

The Kindle version is a complete mess. I know people find it annoying when reviewers drop the rating because of the format, but when you pay good money for a product, you expect professional results. The biggest issue is that all of the code samples look as if they were scanned images that were then OCR'd in. Many of the code samples look incredibly washed out, blurry and are almost impossible to read. Also, there are a few errors that occurred due to this scanning process, such as the wrong braces being displayed, some symbols are changed (what would be a less-than sign might show in the code sample as an equals sign for instance). It's really too bad. Do NOT buy this on Kindle, it is junk.

If the publishers fix this problem I'll happily bring my review up to 5 stars, but until then it remains at 2. I suffered way too many headaches trying to decipher this mess.
2/2 人认为此评论有用
平均5.0 星 Solid and pragmatic with theory, but beware beginner! 2012年6月29日
评论者 SchmidtD - 已在美国亚马逊上发表
版本: 平装 已确认购买
Linq to Objects is one of those books that is an absolute joy for a person with the requisite background, but could only be a nightmare to a beginner in the field.

For the student: Does the following make sense to you? "The zero-based index position can be passed into a lambda expression predicate by assigning a variable name as the second argument..." The author will build to such statements, but if this is completely Greek to you, I'd concentrate on more general C# studies first.

For the pro: Magennis won't make you work very hard, so the book will fly by quickly, but in the end he'll reward you with a lot more depth than you would first imagine. This is not just a surface review of LINQ, but a great introduction that goes into the C# compliler far enough to make the C# programmer feel grounded in not just the use of LINQ, but also in the technology as a study unto itself.

Magennis is a (if not the) LINQ fan, and his love for the technology will rub off, but he never tries to convince you that it replaces database querying. In fact, by sticking to LINQ for Objects in particular, really the book is more about dictionary/collection/list/array manipulation than datasources, although both text file munching and COM interop with Excel as datasources are handled (and I think it's assumed that once you realize you cannot in general use a datareader for LINQ, you can marshal your data into memory by whatever other means you've been using, with some short comment on how to partition data reads for large data sources).

Another strong trait of the text is how Magennis aptly compares C# 2.0 ways of doing things with C# 4.0, not for historical reasons, but because those comparisons really demonstrate what the newer technology must be doing behind the scenes. This is not an obvious set of "least pairs discrimation" so I appluad Magennis on the great didactic results it provides.

I do wish that Magennis had added a final chapter exploring expression trees with the same skill he applied to PLINQ, even if that would have been moving a little off theme; it just seems like even though this text isn't about transforming LINQ queries for use in non-memory sources, nonetheless somehow the expression tree belongs to the story...or maybe I'd just like to pick such an expert's mind on the topic in any case.

The pro will not be burdened or disappointed. Good fun.
3/4 人认为此评论有用
平均5.0 星 Fantastic coverage of a complex topic 2010年6月27日
评论者 Jason Short - 已在美国亚马逊上发表
版本: 平装 已确认购买
I have to say that the book has some really good explanations of how things work. It is not for the complete novice, a lot of LINQ basics are skipped over in favor of more depth. If you have a basic idea about what LINQ is, and you know what a LINQ expression looks like you could probably work your way through it pretty well.

The book is about using LINQ, and PLINQ to change how you query objects and collections in RAM. This is not a database book. You can use any of the methods in this book to work with just about any collection in .Net. Some of the same concepts work with databases like Entity Framework and LINQ to EF, but that is not the core of this book.

A few of the chapters that really stand out to me:

Chapter 7 covers extending LINQ to Objects and has a lot of fantstic nuggets in here. I didn't know you could write your own grouping operator in LINQ until I read this chapter.

Chapter 9 Parallel LINQ to Objects - Nice concise explanations of parallel problems and how to solve them using PLINQ. There is definitely room to expand this section with more advanced topics, but the coverage here is more than enough to get you running and thirst for the in depth discussions on MSDN.

I recommend the book for anyone trying to get their head around LINQ to Objects, and possibly just more advanced LINQ concepts in general.

Of course I recommend you go grab a copy of LINQPAD ([..] ) to write queries in and execute without needing a solution in Visual Studio. I found Linqpad to be amazing for productivity of testing LINQ queries.
16/17 人认为此评论有用
平均5.0 星 Awsome Resource for .Net Deveopers 2010年3月18日
评论者 Reza - 已在美国亚马逊上发表
版本: 平装 已确认购买
I found this book to be most useful of all the Linq books I have come across. It provides great practical examples of how to use Linq effectively on data objects and save hundreds of lines of code. At the same time, the author explains the performance implications so that you can make the right decision for your application. This book was a great find for me as I had a hard time last year when I tried to use Linq in some complex manipulation of objects involving joins.
The only disappointment for me was the fact that when I first I read the book online on Safari Books, the examples were in color and syntax highlighted. I decided to purchase the printed book to have it as a reference. The print edition is not in color and seems a step backwards.
I highly recommend this book to any developer that uses Linq. Not just for objects. It is well thought out and brilliantly written with real life examples.
1/1 人认为此评论有用
平均5.0 星 Best Book on LINQ 2013年1月1日
评论者 Todd Haehn - 已在美国亚马逊上发表
版本: 平装 已确认购买
LINQ to Objects Using C# 4.0 is easy reading and I got through it fairly quickly even doing the samples in the book. The application that comes with the book has all the sample code is an excellent reference which I use when I need help with writing a query. It has all the code listed by chapter and subject so it is easy to find the sample you are looking for. This book has REALLY helped me write LINQ queries!