Skip to product information
Effective C
€33,00
Effective C#
Description
Book Introduction
50 New Ways to Write Better C# Code

C# is gaining more attention as its development area expands from traditional .NET-based development to the Unity game engine.
Additionally, demand continues to grow as Zamarin can support various mobile platforms.
Accordingly, this book provides various tips and practical methods to help software developers use C# more efficiently.


The author shows you 50 ways to fully leverage the power of C# to write efficient, high-performance code.
Drawing on his excellent C# experience, he explains everything from resource management to multi-core support, and presents a variety of options to suit your situation.
We'll explore how to choose the most effective solution and write code that's easy to maintain and improve.

Packed with clear, practical explanations, expert tips, and realistic example code, this book is sure to become a must-have for any intermediate developer.

  • You can preview some of the book's contents.
    Preview

index
CHAPTER 1 C# Language Elements
Item 1: It is better to use var when declaring local variables.
Item 2: Readonly is better than const
Item 3: Is and as are better than cast.
Item 4: Replace string.Format() with interpolated strings.
Item 5: Use FormattableString to generate culture-specific strings.
Item 6: Use the nameof() operator actively.
Item 7: Express callbacks using delegates.
Item 8: Use the null conditional operator when calling events.
Item 9: Minimize Boxing and Unboxing
Item 10: Use the new modifier only when the base class is upgraded.

CHAPTER 2 .NET RESOURCE MANAGEMENT
Item 11: Understanding .NET Resource Management
Item 12: Member initialization is preferable to assignment.
Item 13: Initialize static class members correctly.
Item 14: Minimize Duplicate Initialization Code
Item 15: Don't create unnecessary objects.
Item 16: Never call virtual functions within a constructor.
Item 17: Implement the Standard Dispose Pattern

CHAPTER 3 USE OF GENERICS
Item 18: Set only the constraints that are absolutely necessary.
Item 19: Check types at runtime and use the optimal algorithm.
Item 20: Define object precedence using IComparable[T] and IComparer[T].
Item 21: Write generic classes in case the type parameter supports IDisposable.
Item 22: Support covariance and contravariance.
Item 23: Use delegates to set method constraints on type parameters.
Item 24: Don't specialize generics on base classes or interfaces.
Item 25: Define generic methods if you don't need to create instance fields with type parameters.
Item 26: Implement generic and non-generic interfaces together.
Item 27: Define interfaces concisely and use extension methods to extend functionality.
Item 28: Improve reified generic types using extension methods.

CHAPTER 4 Using LINQ
Item 29: Returning an iterator is better than returning a collection.
Item 30: Query syntax is better than loops.
Item 31: Create a composable API that can be used in sequences.
Item 32: Separate Actions, Predicates, Functions, and Iteration Methods
Item 33: Create the elements you need when you need them.
Item 34: Reduce coupling by using functions as parameters.
Item 35: Never overload extension methods.
Item 36: Understand how query expressions and method call syntax correspond.
Item 37: When using queries, lazy evaluation is better than immediate evaluation.
Item 38: Lambda Expressions Are Better Than Methods
Item 39: Avoid throwing exceptions within functions and actions.
Item 40: Distinguish between deferred and immediate execution.
Item 41: Don't capture expensive resources.
Item 42: Distinguish between IEnumerable[T] and IQueryable[T] data sources.
Item 43: Force the meaning of query results to be clear, and use Single() and First().
Item 44: Don't modify bound variables.

CHAPTER 5 Exception Handling
Item 45: Use exceptions to signal method failure.
Item 46: Use using and try/finally to clean up resources.
Item 47: Write Perfect Custom Exception Classes
Item 48: It is recommended to adhere to strong exception guarantees.
Item 49: Exception filters are better than re-raising exceptions after catching them.
Item 50: Explore other uses of exception filters.

Detailed image
Detailed Image 1

Publisher's Review
50 Useful and Mysterious Tips for C# Developers
It has already been over ten years since the first edition of this book was introduced in Korea.
Meanwhile, the C# community has grown explosively, and the scope of development has expanded as countless developers have adopted C# as their primary language.
In the midst of this, the author has prepared this new third edition focusing on how to efficiently use the latest C# version 6.0 or higher.
We've boldly eliminated topics that were covered in previous editions but are no longer useful, and have organized new topics based on new additions to C# and the .NET Framework, as well as the accumulated experience of the C# community.


The target audience for this book are professional developers who use C# as their primary language.
Therefore, it was written under the assumption that it will be read by developers who are already sufficiently familiar with the grammar and language features of C#.
Rather than explaining the features of C# itself in detail, it shows how to apply those features in the development field and solve problems.
Furthermore, we will guide you on how to write high-quality code using the latest features of C#.


Translator Kim Myeong-sin, who translated both the first and third editions of this book, is a developer with a deep understanding of .NET technology, a distinction that rivals the best in Korea.
As author Baekjun Lim, who has written and translated numerous development books, puts it, the combination of an outstanding author like Bill Wagner and an outstanding programmer-translator like Myeongsin Kim is a rare blessing for readers.
Developers who want to code elegantly while considering performance and efficiency will find this smooth, easy-to-read translated book brimming with interesting tips.

★ Main contents
Chapter 1 - Key expressions used idiomatically beyond the C# language specification
Chapter 2 - Essential Details for Efficient Resource Management in .NET
Chapter 3 - Generic items needed for reusability and performance improvement
Chapter 4 - How to use LINQ, a unique feature and powerful function of C#
Chapter 5 - Exception Handling Techniques Required for Stable Application Development
GOODS SPECIFICS
- Date of publication: November 6, 2017
- Page count, weight, size: 300 pages | 542g | 188*235*20mm
- ISBN13: 9791162240038
- ISBN10: 1162240032

You may also like

카테고리