Skip to content

C# Cookbook

Best in textbook rentals since 2012!

ISBN-10: 0596100639

ISBN-13: 9780596100636

Edition: 2nd 2006 (Revised)

Authors: Stephen Teilhet, Jay Hilyard

List price: $54.99
Blue ribbon 30 day, 100% satisfaction guarantee!
what's this?
Rush Rewards U
Members Receive:
Carrot Coin icon
XP icon
You have reached 400 XP and carrot coins. That is the daily max!

Description:

C# Cookbook Full Description With C# Cookbook, 2nd Edition, you'll be able to learn and improve your mastery of both the C# language and the .NET platform. This updated bestseller has been completely revised to account for C# 2.0, the latest version of this popular object-oriented programming language. It also includes more than 100 new code solutions (over 300 overall) to common problems and tasks that you're sure to face as a C# programmer. Nearly every solution, or "recipe," contains a complete, documented code sample showing you how to solve the specific problem, as well as a detailed discussion of how and why the underling technology works. This question-solution-discussion format is a…    
Customers also bought

Book details

List price: $54.99
Edition: 2nd
Copyright year: 2006
Publisher: O'Reilly Media, Incorporated
Publication date: 2/14/2006
Binding: Paperback
Pages: 1192
Size: 7.00" wide x 9.25" long x 2.00" tall
Weight: 3.234
Language: English

Stephen Teilhet has been working with the .NET platform since the pre-alpha version of the.NET 1.0 framework was being developed by Microsoft. Currently he works for Ounce Labs where he is working on enhancing their static security code analysis tool to find vulnerabilities in several languages including C# and Visual Basic.

Jay Hilyard has been developing applications for the Windows platform for over 15 years and for .NET for more than seven of those. He has published numerous articles in MSDN Magazine and he currently works on the New Product Team at Newmarket International in Portsmouth, NH.

Preface
Numbers and Enumerations
Determining Approximate Equality Between a Fraction and Floating-Point Value
Converting Degrees to Radians
Converting Radians to Degrees
Using the Bitwise Complement Operator with Various Data Types
Testing for an Even or Odd Value
Obtaining the High Word or Low Word of a Number
Converting a Number in Another Base to Base10
Determining Whether a String Is a Valid Number
Rounding a Floating-Point Value
Choosing a Rounding Algorithm
Converting Celsius to Fahrenheit
Converting Fahrenheit to Celsius
Safely Performing a Narrowing Numeric Cast
Finding the Length of Any Three Sides of a Right Triangle
Finding the Angles of a Right Triangle
Displaying an Enumeration Value as a String
Converting Plain Text to an Equivalent Enumeration Value
Testing for a Valid Enumeration Value
Testing for a Valid Enumeration of Flags
Using Enumerated Members in a Bit Mask
Determining if One or More Enumeration Flags Are Set
Determining the Integral Part of a Decimal or Double
Strings and Characters
Determining the Kind of Character a char Contains
Determining Whether a Character Is Within a Specified Range
Controlling Case Sensitivity When Comparing Two Characters
Finding All Occurrences of a Character Within a String
Finding the Location of All Occurrences of a String Within Another String
Implementing a Poor Man''s Tokenizer to Deconstruct a String
Controlling Case Sensitivity When Comparing Two Strings
Comparing a String to the Beginning or End of a Second String
Inserting Text into a String
Removing or Replacing Characters Within a String2.11 Encoding Binary Data as Base64
Decoding a Base64-Encoded Binary
Converting a String Returned as a Byte[ ] Back into a String
Passing a String to a Method That Accepts only a Byte[ ]
Converting Strings to Other Types
Formatting Data in Strings
Creating a Delimited String
Extracting Items from a Delimited String
Setting the Maximum Number of Characters a StringBuilder Can Contain
Iterating over Each Character in a String
Improving String Comparison Performance
Improving StringBuilder Performance
Pruning Characters from the Head and/or Tail of a String
Testing a String for Null or Empty
Appending a Line
Encoding Chunks of Data
Classes and Structures
Creating Union-Type Structures
Allowing a Type to Represent Itself as a String
Converting a String Representation of an Object into an Actual Object
Implementing Polymorphism with Abstract Base Classes
Making a Type Sortable
Making a Type Searchable
Indirectly Overloading the +=, -=, /=, and = Operators
Indirectly Overloading the &&, and ?: Operators
Turning Bits On or Off
Making Error-Free Expressions
Minimizing (Reducing) Your Boolean Logic
Converting Between Simple Types in a Language-Agnostic Manner
Determining When to Use the Cast Operator, the as Operator, or the is Operator
Casting with the as Operator
Determining a Variable''s Type with the is Operator
Implementing Polymorphism with Interfaces
Calling the Same Method on Multiple Object Types
Adding a Notification Callback Using an Interface
Using Multiple Entry Points to Version an Application
Preventing the Creation of an Only Partially Initialized Object
Returning Multiple Items from a Method
Parsing Command-Line Parameters
Retrofitting a Class to Interoperate with COM
Initializing a Constant Field at Runtime
Writing Code That Is Compatible with the Widest Range of Managed Languages
Building Cloneable Classes
Assuring an Object''s Disposal
Releasing a COM Object Through Managed Code
Creating an Object Cache
Rolling Back Object Changes
Disposing of Unmanaged Resources
Determining Where Boxing and Unboxing Occur
Generics
Deciding When and Where to Use Generics
Understanding Generic