Search - Articles - Dev Forums - Favorites - Member Login  
DevASP.NET for ASP.NET, VB.NET, XML and C# (C-Sharp) Developers Friday, September 03, 2010

Dev Articles
Search Directory
ASP.NET
VB.Net
C-Sharp
SQL Server
 

Build the right apps the right way with powerful development tools.
Visual Studio 2010. Learn more...

Home > Search > Sample Chapters > C-Sharp
Search:
What's New - What's Hot


Professional C# Sample Chapter: Graphics with GDI+        
Total Hits: 934  |  Today: 0 Author: Wrox Publishing       Rating:  
Read Reviews | Write Review |   Your Rating: 

This is chapter 21 of the book Professional C# from Wrox Publishing, titled Graphics with GDI+. It shows you how to use GDI+ to create a customised user interface. It explains how to create items within the area of the screen covered by your application, and will show you how to use your code to control them....

CHAPTER 21 Attributes        
Total Hits: 413  |  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 20 "Loading a Class By Name"        
Total Hits: 655  |  Today: 1 Author: 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 13 "Dynamic Loading with Reflection"        
Total Hits: 734  |  Today: 0 Author: 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 22 "Version Safe Object Serialization"        
Total Hits: 308  |  Today: 0 Author: 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 5 "C++ and Java Gumption Traps"        
Total Hits: 292  |  Today: 0 Author: Jeff Louie       Rating:  
Read Reviews | Write Review |   Your Rating: 

It's time for another break from theory and on to some real world programming challenges. In this chapter, you take a detour into the world of gumption traps. A gumption trap is a situation that is so frustrating that it sucks the "gumption" or energy out of you. Surprisingly, a lot of gumption traps come from preconceived notions of what "should" be correct. C++ and Java programmers are prone to gumption traps due to their assumptions about the C# language. In other words, C++ and Java programm...

Chapter 3 "Model--View/Controller"        
Total Hits: 395  |  Today: 0 Author: Jeff Louie       Rating:  
Read Reviews | Write Review |   Your Rating: 

Enough theory. It's time to code! In this chapter, you will learn about the most basic design pattern, the Model--View/Controller architecture (M-VC). This lesson contains the complete source code of a Model class that encapsulates the complex math required to do mortgage calculations. You will then create a working Mortgage calculator as a Windows Form application. Finally, you will reuse the Model class to create a working calculator as a Web Form application. This is all working C# code that ...

Ohm's Problem        
Total Hits: 372  |  Today: 0 Author: Tom Dziedzic.       Rating:  
Read Reviews | Write Review |   Your Rating: 

I have been interested in making electronic components not just for the computer but for the everyday life and self entertainment. I wanted to make all the calculations from ohm's law into a simple program that will enable quick calculations while using the .net framework v.2.0 and in the process using a new language: C#, normally I use C++ but I wanted to switch to the newest technologies out so far. Anyways I have found alot about computer programming like an interesting fact is that the .net ...

String.Split        
Total Hits: 473  |  Today: 0 Author: Salman Ahmed       Rating:  
Read Reviews | Write Review |   Your Rating: 

This method finds all the substrings in a string that are seperated by one or more characters, returning a string array. This method also has 1 overload where you can specifiy the maximum number of elements in an array to return from the string....

Utility Belt: Xray Demo C#        
Total Hits: 372  |  Today: 0 Author: Charles Carroll       Rating:  
Read Reviews | Write Review |   Your Rating: 

The code below calls "Utility Belt" functions.
The Array Manipulation Code is one demo of Array "Utility Belt" functionality including tracing of arrays and datatables....

Murach's C# 2005    Version: 1890774375       Price: $52.50   
Total Hits: 556  |  Today: 0 Author: 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....

A Preview of C# - Chapter 7: Namespaces and the Base Classes        
Total Hits: 719  |  Today: 0 Author: Wrox       Rating:  
Read Reviews | Write Review |   Your Rating: 

In this chapter we're going to look at the base classes – the vast number of .NET classes that Microsoft has written for you, and also namespaces – the system by which classes are grouped together.A significant part of the power of the .NET framework comes from the base classes supplied by Microsoft as part of the .NET framework. These classes are all callable from C# and provide the kind of basic functionality that is needed by many applications to perform, amongst other things, basic system, W...

CHAPTER 12 Delegates and Events        
Total Hits: 423  |  Today: 0 Author: 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 ...

Interfaces and the .NET Framework        
Total Hits: 334  |  Today: 0       Rating:  
Read Reviews | Write Review |   Your Rating: 

Besides calling into interfaces that are implemented by library classes,many .NET classes call standard interfaces. If we provide our own implementation of such interfaces, we can have .NET library code call our own code in appropriate ways, customizing the behavior of library code. We will look at examples, including object cloning and comparison of objects. This behavior of your program being called into has traditionally been provided by “callback” functions. In C# there is a type-safe, objec...

Chapter 17 "Designing Extendable Classes"        
Total Hits: 506  |  Today: 0 Author: 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 16 "Designing Interfaces"        
Total Hits: 619  |  Today: 0 Author: Jeff Louie       Rating:  
Read Reviews | Write Review |   Your Rating: 

In this chapter we are going to further explore the subject of interfaces. We are going to investigate the challenges of designing an interface, using composite interfaces and providing skeletal abstract classes. In Chapter 13, we defined an interface IDrawable to enable a plug-in architecture. Trying to modify the IDrawable interface provides a good example of the challenges of an evolving interface design....

Chapter 15 "Using IComparer"        
Total Hits: 641  |  Today: 0 Author: 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 10 "Indirection and Loose Coupling"        
Total Hits: 284  |  Today: 0 Author: 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 21 "Just Print It!"        
Total Hits: 287  |  Today: 0 Author: Jeff Louie       Rating:  
Read Reviews | Write Review |   Your Rating: 

It is surprisingly easy to add full printing support to our Draw program. Although this is certainly a detour from the topic of object oriented programming, it is just too cool to skip. You can add "Page Setup", "Print Dialog" and "Print Preview" support to the Draw program by simply dragging the controls onto the Draw form! Read the chapter to learn more!...

Chapter 23 "Backward Compatibility"        
Total Hits: 217  |  Today: 0 Author: 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 ...


1  2  3  4  Next >> 

DevASP.Net - Disclaimer - Privacy
© 2002-2010 DevASP.net