Search - Articles
DevASP.NET for ASP.NET, VB.NET, XML and C# (C-Sharp) Developers Tuesday, March 03, 2009
Dev Articles
Search Directory
ASP.NET
VB.Net
C-Sharp
SQL Server
 


Home >Search > Sample Chapters > C-Sharp


Search:
What's New - What's Hot
Essential C# 2.0: Chapter 11: Generics     
Total Hits: 478  |  Today: 0Author: Addison-Wesley.      Rating:  
Read Reviews | Write Review |  Your Rating: 

As your projects become more sophisticated, you will need a better way to reuse and customize existing software. To facilitate code reuse, especially the reuse of algorithms, C# includes a feature called generics. Just as methods are powerful because they can take parameters, classes that take type parameters have significantly more functionality as well, and this is what generics enable. Like their predecessor, templates, generics enable the definition of algorithms and pattern implementations ...

Murach's C# 2005  Version: 1890774375     Price: $52.50  
Total Hits: 688  |  Today: 0Author: Joel Murach      Rating:  
Read Reviews | Write Review |  Your Rating: 

Become the C# developer that companies compete for. Whether you’re new to C# or upgrading to 2005, this book teaches you how to develop 3-layer Windows Forms applications that do database processing…the applications that businesses rely on each day....

Effective Data Access in C#     
Total Hits: 503  |  Today: 0Author: Rob Harrop      Rating:  
Read Reviews | Write Review |  Your Rating: 

The vast majority of applications we design today whether they are process management applications,e-commerce applications, or any other enterprise application require database access. It is also true to say that the database layer of any application is where the performance of an application can be either
seriously enhanced or severely hindered....

Teach Yourself C# in 24 Hours - Chapter 3 - Understanding C# Objects and Collections     
Total Hits: 244  |  Today: 0Author: James Foxall and Wendy Haro-Chun.      Rating:  
Read Reviews | Write Review |  Your Rating: 

So far, you've gotten an introduction to programming in C# by building a Picture Viewer project. You spent the
previous hour digging into the IDE and learning skills critical to your success with C#. In this hour, you're going to start learning about some important programming concepts, namely objects.The term object, as it relates to programming, may have been new to you prior to this book. The more you work with C#, the more you'll hear about objects. C# is a true object-oriented language. ...

Microsoft Visual C# .NET 2003 Developer's Cookbook - Chapter 3 - Strings and Regular Expressions     
Total Hits: 174  |  Today: 0      Rating:  
Read Reviews | Write Review |  Your Rating: 

seemingly random jumble of binary data that applications use to accomplish a task. They appear in all facets of application development from the smallest system utility to large enterprise services. Their value is so apparent that more and more connected systems are leaning toward string data within their communication protocols by utilizing the Extensible Markup Language (XML) rather than the more cumbersome traditional transmission of large binary data. This book uses strings extensively to ex...

CHAPTER 21 Attributes     
Total Hits: 547  |  Today: 0      Rating:  
Read Reviews | Write Review |  Your Rating: 

IN MOST PROGRAMMING LANGUAGES, some information is expressed through declaration,and other information is expressed through code. For example, in the following class member declaration
public int Test;the compiler and runtime will reserve space for an integer variable and set its protection so that it is visible everywhere. This is an example of declarative information;it’s nice because of the economy of expression and because the compiler handles the details for us.Typically, the types of de...

Chapter 8 Regular Expressions     
Total Hits: 197  |  Today: 0Author: Stephen Teilhet & Jay Hilyard      Rating:  
Read Reviews | Write Review |  Your Rating: 

Included in the .NET Framework Class Library is the System.Text.RegularExpressions namespace that is devoted to creating, executing, and obtaining results from regular expressions executed against a string. Regular expressions take the form of a pattern that can be matched to zero or more characters within a string. The simplest of these patterns, such as .* (match anything and everything) and [A-Za-z] (match any letter) are easy to learn, but more advanced patterns can be difficult to learn and...

CHAPTER 12 Delegates and Events     
Total Hits: 579  |  Today: 0Author: Jesse Liberty      Rating:  
Read Reviews | Write Review |  Your Rating: 

When a head of state dies, the president of the United States typically does not have time to attend the funeral personally. Instead, he dispatches a delegate. Often this delegate
is the vice president, but sometimes the VP is unavailable and the president must send someone else, such as the secretary of state or even the first lady. He does not want to “hardwire” his delegated authority to a single person; he might delegate
this responsibility to anyone who is able to execute the correct ...

Custom Controls in Visual C# .NET     
Total Hits: 766  |  Today: 0      Rating:  
Read Reviews | Write Review |  Your Rating: 

Embedding user controls in a Windows form is just like adding a simple button or text box that are already provided with .NET. These basic controls were written essentially like you code your own controls. Typically the controls you design are to be used in multiple forms or to modularize your code. These reasons help reduce the amount of code you have to type as well as make it easier for you to change your implementation. There should almost never be any reason to duplicate code because it lea...

Chapter 20 "Loading a Class By Name"     
Total Hits: 793  |  Today: 0Author: Jeff Louie      Rating:  
Read Reviews | Write Review |  Your Rating: 

A problem that comes up repeatedly is how to load a class dynamically at run time given the name of the class (as a string) and the name of the assembly that contains the class (eg. AssemblyName.dll). In a sense, the runtime fully qualified name is the assembly name pre-pended to the fully qualified class name....

Chapter 17 "Designing Extendable Classes"     
Total Hits: 655  |  Today: 0Author: Jeff Louie      Rating:  
Read Reviews | Write Review |  Your Rating: 

In Chapter 7, we investigated the conundrum of using implementation inheritance versus containment. Some authors have argued that composition or containment by ownership is generally preferable to implementation inheritance. Joshua Block argues in "Effective Java" to "favor composition over inheritance." He quotes Snyder that "Unlike method invocation, inheritance breaks encapsulation." He concludes that since "a subclass depends on the implementation details of its super class for its proper fu...

Chapter 15 "Using IComparer"     
Total Hits: 795  |  Today: 0Author: Jeff Louie      Rating:  
Read Reviews | Write Review |  Your Rating: 

In Chapter 13, I demonstrated the use of encapsulation and polymorphism to load a plug-in at runtime. In this chapter, I am going to demonstrate how to use the IComparer interface to reuse the generic sort and binary search algorithm provided by the ArrayList class. The ArrayList class defers the final implementation of the sort and binary search algorithm to a more knowledgeable class. The more knowledgeable class must provide a useful concrete implementation of the IComparer interface. Properl...

Chapter 13 "Dynamic Loading with Reflection"     
Total Hits: 884  |  Today: 0Author: Jeff Louie      Rating:  
Read Reviews | Write Review |  Your Rating: 

In Chapter two I alluded to the power of abstract classes (and interfaces). In this chapter I am going to demonstrate how to implement a plug in architecture using an interface and the power of dynamic reflection. In this chapter I am going to demonstrate the use of encapsulation and polymorphism to allow the dynamic loading of a "plug in" class at runtime. The loading of a third party plug in class at runtime is useful when you want to add new functionality to an existing program. Since the ap...

Chapter 10 "Indirection and Loose Coupling"     
Total Hits: 407  |  Today: 0Author: Jeff Louie      Rating:  
Read Reviews | Write Review |  Your Rating: 

Some would argue that indirection is a basic principle of OOP (object oriented programming) and a basic tenant of Software Engineering 101. The concept of a class that encapsulates or hides the actual implementation details can be considered an example of the use of indirection. In this example, the use of indirection adds flexibility and eases code maintenance. A closely related, but poorly defined topic in software engineering, is the concept of loose coupling....

Chapter 22 "Version Safe Object Serialization"     
Total Hits: 385  |  Today: 0Author: Jeff Louie      Rating:  
Read Reviews | Write Review |  Your Rating: 

The .NET framework has built in support for object persistence using serialization. This is done using Serialization.Formatters.Binary or Serialization.Formatters.Soap in the System.Runtime namespace. As long as the objects in the serialization graph support serialization, adding object persistence to the Draw program is surprisingly easy....

Chapter 23 "Backward Compatibility"     
Total Hits: 306  |  Today: 0Author: Jeff Louie      Rating:  
Read Reviews | Write Review |  Your Rating: 

In this brief chapter, we examine the problem of backward compatibility. If we add a new "fill" feature to the DrawableShape class, it is desirable that this new feature does not break the existing Draw application. One way to solve this problem is to rely on our decision to program to the IDrawableShape interface and the ability of the DrawYourself method to encapsulate or hide the actual implementation of the drawing behavior. In this chapter we create a new interface IFillable, implement the ...

Chapter 24 "A Windows Form Print Framework"     
Total Hits: 120  |  Today: 0Author: Jeff Louie      Rating:  
Read Reviews | Write Review |  Your Rating: 

To demonstrate the capabilities of inheritance and OOP here are a few screenshots of a WinForms Printing Framework using Visual Studio as a code generator. The printable controls are created by extending from existing controls in the System.Windows.Forms.Control namespace. The new user controls are then compiled into a dll and added to the Visual Studio Form Designer Toolbox. When you drag a printable control onto Visual Studio, the Form Designer does all of the heavy lifting, generating the cod...

Chapter 8 "Shadow Fields, Override Virtual Methods"     
Total Hits: 266  |  Today: 0Author: Jeff Louie      Rating:  
Read Reviews | Write Review |  Your Rating: 

Well, I am going to finish this "nuts and bolts" chapter before I flame out! I promised that I would discuss overriding, so I am going to make good on this promise. In general when you extend a class, you shadow fields with the same name in the base class and override virtual methods with the same name and parameter list in the base class. Overriding makes the base class method invisible. Shadowing a field, only hides the field from view. You can still explicitly touch the hidden shadowed field ...

Chapter 6 "Objects Have Class, References Have Type"     
Total Hits: 125  |  Today: 0Author: Jeff Louie      Rating:  
Read Reviews | Write Review |  Your Rating: 

Well, you have arrived. If you have survived to this point, you are beginning to realize both the power and complexity of programming using objects and inheritance. Much of the confusion about references, types, classes and objects is simplified by the following statement "Objects have class, references have type." The more technically correct version may be "Objects have class, reference variables have type." As long as it is understood that reference variables "contain" references to objects, ...

Chapter 1 “Classes, Objects, and Properties”     
Total Hits: 515  |  Today: 0Author: Jeff Louie      Rating:  
Read Reviews | Write Review |  Your Rating: 

Simply put, programming with objects simplifies the task of creating and maintaining complex applications. OOP is a completely different way of thinking that differs significantly from the more traditional function driven sequential programming model of old. Programming with objects without inheritance is “object-based” programming. Adding inheritance to objects is “object-oriented” programming. OOP provides built in support for code reuse (inheritance) and support for runtime variations in pro...


1  2  3  4  Next >> 


Disclaimer - Privacy
© 2002-2017 DevASP.net