C# 4.0 Pocket Reference: Instant Help For C# 4.0 Programmers

E-Book Overview

When you're programming C# 4.0 and need a little help, this tightly focused and practical book tells you exactly what you need to know -- without long introductions or bloated examples. It's ideal as a succinct quick reference or as a guide to get you rapidly up to speed if you already know Java, C++, or an earlier version of C#.

Written by the authors of the acclaimed C# 4.0 in a Nutshell (O’Reilly), this book covers the entire C# 4.0 language -- without skimping on the details -- including:

  • Features new to C# 4.0, such as dynamic binding, optional and named parameters, and type parameter variance
  • All of C#'s fundamentals
  • Advanced topics, including operator overloading, custom conversions, type constraints, covariance and contravariance, lambda expressions and closures, iterators, nullable types, and operator lifting
  • LINQ, starting with sequences, lazy execution, and standard query operators; finishing with a complete reference to query expressions
  • Unsafe code and pointers, custom attributes, preprocessor directives, and XML documentation

E-Book Content

C# 4.0 Pocket Reference THIRD EDITION C# 4.0 Pocket Reference Joseph Albahari and Ben Albahari Beijing • Cambridge • Farnham • Köln • Sebastopol • Taipei • Tokyo C# 4.0 Pocket Reference, Third Edition by Joseph Albahari and Ben Albahari Copyright © 2010 Joseph Albahari and Ben Albahari. All rights reserved. Printed in Canada. Published by O’Reilly Media, Inc., 1005 Gravenstein Highway North, Sebastopol, CA 95472. O’Reilly books may be purchased for educational, business, or sales promotional use. Online editions are also available for most titles (http://my.safari booksonline.com). For more information, contact our corporate/institutional sales department: (800) 998-9938 or [email protected] Editor: Mike Hendrickson Production Editor: Kristen Borg Proofreader: Kiel Van Horn Indexer: Angela Howard Cover Designer: Karen Montgomery Interior Designer: David Futato Illustrator: Robert Romano Printing History: November 2002: February 2008: August 2010: First Edition. Second Edition. Third Edition. Nutshell Handbook, the Nutshell Handbook logo, and the O’Reilly logo are registered trademarks of O’Reilly Media, Inc. C# 4.0 Pocket Reference, the image of an African crowned crane, and related trade dress are trademarks of O’Reilly Media, Inc. Many of the designations used by manufacturers and sellers to distinguish their products are claimed as trademarks. Where those designations appear in this book, and O’Reilly Media, Inc., was aware of a trademark claim, the designations have been printed in caps or initial caps. While every precaution has been taken in the preparation of this book, the publisher and authors assume no responsibility for errors or omissions, or for damages resulting from the use of the information contained herein. ISBN: 978-1-449-39401-1 [TM] 1280502296 Contents C# 4.0 Pocket Reference Using Code Examples How to Contact Us Safari® Books Online A First C# Program Compilation Syntax Identifiers and Keywords Literals, Punctuators, and Operators Comments Type Basics Predefined Type Examples Custom Type Examples Conversions Value Types Versus Reference Types Predefined Type Taxonomy Numeric Types Numeric Literals Numeric Conversions Arithmetic Operators Increment and Decrement Operators Specialized Integral Operations 1 2 2 3 3 6 7 7 9 10 10 10 11 14 15 18 19 20 21 22 22 22 v 8- and 16-Bit Integrals Special Float and Double Values double Versus decimal Real Number Rounding Errors Boolean Type and Operators Equality and Comparison Operators Conditional Operators String
You might also like

Computer Science Handbook
Authors: Allen B. Tucker    227    0


Object-oriented Analysis And Design With Applications
Authors: Grady Booch , Robert A. Maksimchuk , Michael W. Engel , Bobbi J. Young , Jim Conallen , Kelli A. Houston    149    0


Functional Programming
Authors: Fokker J.    180    0


The Curve Shortening Problem
Authors: Kai-Seng Chou , Xi-Ping Zhu    163    0


Scientific Visualization: The Visual Extraction Of Knowledge From Data
Authors: Georges-Pierre Bonneau , Thomas Ertl , Gregory M. Nielson    160    0


Introduction To Complexity Theory, Lecture Notes
Authors: Goldreich O.    136    0


Object-oriented Programming Via Fortran 90-95
Authors: Ed Akin    154    0


New Optimization Algorithms In Physics
Authors: Alexander K. Hartmann , Heiko Rieger    152    0


Linear Programming: Foundations And Extensions
Authors: Robert Vanderbei    139    0


An Invariant Approach To Statistical Analysis Of Shapes
Authors: Subhash R. Lele , J. T. Richtsmeier    101    0