By Trey Nash

Show description

Read or Download Accelerated C Sharp 2010 Jan 2010 PDF

Best programming: programming languages books

Essential Java Fast : How to write object oriented software for the Internet

Java is a brand new and interesting object-oriented programming language that is set to rework the realm huge internet. Java permits clients to jot down functions that are accessed throughout diverse structures and gives an efficient technique of construction small yet strong courses that permit an important variety of recent purposes - comparable to animation, dwell updating, two-way interactions and so on.

Designing SQL Server 2000 Databases. for .Net ™ Enterprise Servers

The Microsoft . web initiative is the way forward for e-commerce - making it attainable for businesses to construct a safe, trustworthy e-commerce infrastructure. this can be the 1st publication to stipulate the features of SQL Server 2000, one of many key parts of . internet. SQL Server 2000 introduces robust new facts mining performance designed in particular to trap and approach patron profiles and to foretell destiny paying for styles on e-commerce websites.

Extra resources for Accelerated C Sharp 2010 Jan 2010

Sample text

The GC frees you from the burden of handling memory allocation and deallocation, which is where many software errors can occur. However, the GC doesn’t remove all resource-handling burdens from your plate, as you’ll see in Chapter 4. For example, a file handle is a resource that must be freed when the consumer is finished with it, just as memory must be freed in the same way. The GC handles only memory resources directly. To handle resources other than memory, such as database connections and file handles, you can use a finalizer (as I’ll show you in Chapter 13) to free your resources when the GC notifies you that your object is being destroyed.

After you’re done, you return the result as an instance of type object. Although this version of the method can seem more flexible, it’s a disaster waiting to happen. What if some code in the application attempts to pass an instance of type Apple into ComputeAvg? Object, as every other class does. However, you’ll get a 17 CHAPTER 3 ■ C# SYNTAX OVERVIEW nasty surprise at runtime when your application throws an exception declaring that it cannot convert an instance of Apple to an integer. The method will fail, and unless you have an exception handler in place, it could terminate your application.

Your mileage may vary with this regard because there is also the added overhead of CLR management structures, assembly metadata, and other constructs loaded in memory. exe from a Visual Studio 2010 command prompt. 10 CHAPTER 2 ■ C# AND THE CLR small applications, managed code along with the CLR can consume more memory than the native counterpart. • Only IL code that is executed ever gets JIT-compiled: IL code is generally more compact than machine code, so keeping the compiled code to a minimum reduces the memory footprint of the application.

Download PDF sample

Rated 4.65 of 5 – based on 40 votes